By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,479 Members | 1,601 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,479 IT Pros & Developers. It's quick & easy.

Access Query To display previous months Records

P: 48
i have a query with two date fields General.Date and Finance.Date. i would like the date in Finance.Date to be previous month of General.Date. So for example if General Date is in the month of February, the Finance.Date should be in the month of January. i put the following expression in the criteria section of Finance.Date =DateAdd("m",-1,[tblGeneral.Date]) but it is not working

Thank you for your help
Apr 22 '09 #1
Share this Question
Share on Google+
6 Replies

Expert 2.5K+
P: 2,653
Hello, zandiT.

I couldn't say I've understood your question completely.
Anyway, you may find the following link helpful.
Calculating figures from a previous month

Apr 22 '09 #2

P: 48
Thank you for the quick response fishval,
let me explain further.
i need to create a report that displays information from two different tables as well as current records and previous records form the previous 3 months. the current records are not a problem, its displaying the records for the previous months thats an issue for me. i need to put it in a query so its easier to link it to a report.
Apr 22 '09 #3

Expert 2.5K+
P: 2,653
Please post the MetaData for all relevant datasets. Here is an example of how to post table MetaData :
Table Name=tblStudent
Expand|Select|Wrap|Line Numbers
  1. Field; Type; IndexInfo
  2. StudentID; AutoNumber; PK
  3. Family; String; FK
  4. Name; String
  5. University; String; FK
  6. Mark; Numeric
  7. LastAttendance; Date/Time
Apr 22 '09 #4

P: 48
GeneralID: Autonumber PK
BorrowerName: String
DateAdded: Date/Time

FinanceID: AutonumberPK
Amount: Currnecy
Date: Date/Time

the tables are joined in a query
the report should display currnet records, as well as the same data but from the previous 3 months for comparative purposes. So for example;
Position as at 31 May 2009 and Position as at 28 February 2009.
Apr 22 '09 #5

Expert 2.5K+
P: 2,653

Post please your query SQL, since relation between the tables is, at any rate, unclear.
Apr 22 '09 #6

Expert Mod 15k+
P: 31,709
According to your latest post this refers to the fields quite incorrectly. It should be :
Expand|Select|Wrap|Line Numbers
  1. tblFinance.Date=DateAdd('m',-1,tblGeneral.DateAdded)
Apr 23 '09 #7

Post your reply

Sign in to post your reply or Sign up for a free account.