raviprakashg Posted February 10, 2006 Share Posted February 10, 2006 Dear Friends,I want to Know how to Maintain My DB Year By Year(Finacial), Now im using Ms Access, what I want is the user have to Select the Database of which year he want to access to Manipulate or Take ReportsKindly Help me in this MatterThanksYours Ravi prakash Link to comment Share on other sites More sharing options...
aspnetguy Posted February 10, 2006 Share Posted February 10, 2006 you'd be better off storeing all in one database regardless of the year and just add a date field to each record that way when you query you can filter by year. Link to comment Share on other sites More sharing options...
raviprakashg Posted February 10, 2006 Author Share Posted February 10, 2006 Okey, But My boss is wants to select the Details from which year he wants, kindly Help. Link to comment Share on other sites More sharing options...
aspnetguy Posted February 10, 2006 Share Posted February 10, 2006 Your SELECT statement would go something like this SELECT * FROM tablenameWHERE YEAR(DateField) = YEAR(getDate()) That statement would get every record from the table that was from this yearyou could also do this SELECT * FROM tablenameWHERE YEAR(DateField) = 2004 to get all records from 2004...fill in the year you wish to retreive...you could have a drop down list on your application that allowed your boss to choose the year then have his selection inputed intot he SQL statement before executetion.This code is for SQL Server but I think it will work in Access too since they are both MS Link to comment Share on other sites More sharing options...
Kcarson Posted February 15, 2006 Share Posted February 15, 2006 Your SELECT statement would go something like thisSELECT * FROM tablenameWHERE YEAR(DateField) = YEAR(getDate()) That statement would get every record from the table that was from this yearyou could also do this SELECT * FROM tablenameWHERE YEAR(DateField) = 2004 to get all records from 2004...fill in the year you wish to retreive...you could have a drop down list on your application that allowed your boss to choose the year then have his selection inputed intot he SQL statement before executetion.This code is for SQL Server but I think it will work in Access too since they are both MS <{POST_SNAPBACK}> Another consideration if he wants to be able to do the query without having to remember to type in the year each time would be to create views that are named based on the year and search only through that year. So you would have tablename2006, tablename 2005, tablename 2004, etc. That way all the data is still stored in one place which will be much easier to manipulate later on or if you need to do full reports on all years rather than just one. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now