-
Help
So I am new to database reasoning, and my work currently wants to implement Access 2007. I'm stuck though. I'm trying to create a macro for a table so that the table will display all dates from 9 months and prior. Does anyone know how to write this code!?!?!
-
Re: Help
You will want to create a select query and use a where clause to filter the data. Access has a wizard to help with this, a wysiwyg and the ability to type in sql directly to create the query. What you would need assuming the date is in an actual date field is something like
Select * from MyTable where TransDate<=#TargetDate#;
Where TargetDate is the cut off date
You can also do
Select * from MyTable where TransDate<=#[Enter Date]#;
To prompt the user for the date to use.
Both queries will return all columns of all rows which match the date criteria.
-
Re: Help
A macro implies VBA, rather than VB6. The code that you use for the query is the same, though