Setting parameter to date field formatted xx/xx/xxxx

  • Thread starter Thread starter Pearl
  • Start date Start date
P

Pearl

First, I'm no programmer. I do all my work using the Access Wizards. I have
a query that uses a date field formatted like xx/xx/xxxx. I recently
received a request to modify this database so that it will allow us to enter
a MONTH (i.e Apr) and then create a dynaset from that parameter entry. How
can I do this (without coding, that is)?
 
First, I'm no programmer. I do all my work using the Access Wizards. I have
a query that uses a date field formatted like xx/xx/xxxx. I recently
received a request to modify this database so that it will allow us to enter
a MONTH (i.e Apr) and then create a dynaset from that parameter entry. How
can I do this (without coding, that is)?

What's the meaning of Apr? April this year? The next April after today? The
most recent April?

What you could do is use a Form with an unbound combo box based on a list of
values:

Jan;1;Feb;2;Mar;3;Apr;4;May;5

and so on. Set its ColumnCount to 2, Bound Column to 2, ColumnWidths to
0.25";0" to conceal the number. Use a criterion *resembling* - dependent on
the answers to my first questions!
= DateSerial(Year(Date()), Forms!YourForm!cboMonth), 1) AND < DateSerial(Year(Date()), Forms!YourForm!cboMonth + 1, 1)

to get the dates within that month.
 
Back
Top