Setting parameter to date field formatted xx/xx/xxxx

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)?
 
L

Lonnie via AccessMonster.com

Pearl, I have just been asked to do the exact same thing---- Hope someone has
an answer for us, I've searched and haven't found any info on this.
 
J

John W. Vinson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top