Unanswered: Field criteria based on System Date(Month). Is it possible? Please help!
I hope there’s a solution for this dilemma.
I have a Form, 2 Tables & 2 Listboxes.
AgentID | FirstName | LastName |
MonitorID | Date | Score | AgentID |
My question is, is there a way to make MonitorListbox display only monitors for the current month? Is there a criteria I could place under Date field based on current System Date(Month in this case)?
What I've done so far...
1. I’ve place a SELECT Query into AgentListbox so that it can display a list of all agents(records) stored in AgentTable.
1.2 I’ve placed an ON CLICK Event behind AgentListbox like this:
2. I’ve placed a SELECT Query into MonitorListbox so that it can return all monitors(records) stored in MonitorTable based on selected agent from AgentListbox.
The problem I encountered is the fact that MonitorListbox will return all monitors done in the agent by their respective supervisor throughout the Year and my goal is to keep it in a Month-To-Date basis. The goal here is to only display monitors dated the current month even know there may exist monitors for many different months. Then, when System Date changes to a new month, shall not retun any results since it is now the begining of a new month.
If you want the query itself to show that format, first make sure the properties window is open (View/Properties) then just open the query in design view and click once somewhere in the date field. The properties window should say Field Properties in the title bar. There you can set the Format property to mm/dd/yyyy. Essentially the same procedure applies for a textbox on a form.
You must be applying that format to your fldMonth field. I assumed you wanted to apply it to your original date field. Applying it to your month field, which currently being February would return 2, will return 01/01/1900 because it reads the number 2 as the serial number of the date. 1 would return 12/31/1899. I'm not clear on what you want here.
As for your last question, I think it should work if your form with all the textboxes is based on a query that has a date field in it.