ipaul75
03-31-2009, 05:06 AM
This is for Microsoft Access
So far I have created a simple macro. I have tried a few things with it. What I would like to do is set the macro to filter the form by filtering all information related to the current month we are in. So for example, I would like to set the filter macro to only show information for all of March. I have been able to set a query for a table to only display the current month from the data that is entered from the form.
This is what I have set up for the query:
Field: MonthLogged: Month([OpenDate])
Table:
Sort:
Criteria: Month(Now())
This is what I have for the macro for filtering the form. I only have gotten to filtering to the current date.
Macro Name: ShowCurrentMonth
Action: ApplyFilter
Where Condition: [OpenDate]=Now()
I have tried using the query condition for the where condition in the macro, but it doesn't seem to do anything. The form shows it is filtered, but it didn't filter out anything.
If there is another way to get this done without a macro or command button, please let me know. The Query works perfectly, I am just trying to figure out how to do this on a form. I would really like to be able to open the form and have it filtered already for the current month if that is possible.
Is there anyone who can help me!
Thanks,
ipaul75
I feel stupid. I figured this out myself. I just created a new Query that looked for the current month and I am now using a form based on the new query.
So far I have created a simple macro. I have tried a few things with it. What I would like to do is set the macro to filter the form by filtering all information related to the current month we are in. So for example, I would like to set the filter macro to only show information for all of March. I have been able to set a query for a table to only display the current month from the data that is entered from the form.
This is what I have set up for the query:
Field: MonthLogged: Month([OpenDate])
Table:
Sort:
Criteria: Month(Now())
This is what I have for the macro for filtering the form. I only have gotten to filtering to the current date.
Macro Name: ShowCurrentMonth
Action: ApplyFilter
Where Condition: [OpenDate]=Now()
I have tried using the query condition for the where condition in the macro, but it doesn't seem to do anything. The form shows it is filtered, but it didn't filter out anything.
If there is another way to get this done without a macro or command button, please let me know. The Query works perfectly, I am just trying to figure out how to do this on a form. I would really like to be able to open the form and have it filtered already for the current month if that is possible.
Is there anyone who can help me!
Thanks,
ipaul75
I feel stupid. I figured this out myself. I just created a new Query that looked for the current month and I am now using a form based on the new query.