Hi All,
I am just a beginner and I have a problem. I am building a db in 2007 and in the source data there is a date field which has dates into the future but I only want the query to run with dates from the current and previous months. I do not want the user to have to stipulate the date range so I have created a make table Month(Date)) this I have put into a macro which the db admin can can monthly to update all source data and run all reference queries. The Month(Date)) query returns a numerical value Sept = 9, therefore my logical was to create a lookup table rows 1-12 and in the next column the required month end date eg: Sept may close off on the 25th of the month, my idea was to the make this amake table query which would only generate the create month end date and then I intended to query against this date for all other queries ie: <= 25/09/2013.
The problem I is how to write the lookup query ie: Lookup Current Month, if = 9, lookup referenceMonthtbl where column 1 = 1-12 and therefore row 9 = {date} in column 2
any ideas and sorry if its a bit wordy
Alex
I am just a beginner and I have a problem. I am building a db in 2007 and in the source data there is a date field which has dates into the future but I only want the query to run with dates from the current and previous months. I do not want the user to have to stipulate the date range so I have created a make table Month(Date)) this I have put into a macro which the db admin can can monthly to update all source data and run all reference queries. The Month(Date)) query returns a numerical value Sept = 9, therefore my logical was to create a lookup table rows 1-12 and in the next column the required month end date eg: Sept may close off on the 25th of the month, my idea was to the make this amake table query which would only generate the create month end date and then I intended to query against this date for all other queries ie: <= 25/09/2013.
The problem I is how to write the lookup query ie: Lookup Current Month, if = 9, lookup referenceMonthtbl where column 1 = 1-12 and therefore row 9 = {date} in column 2
any ideas and sorry if its a bit wordy
Alex