use the name of a month to query in a date field

megatronixs

Registered User.
Local time
Tomorrow, 00:40
Joined
Aug 17, 2012
Messages
719
Hi all,

I'm looking into passing a month name from a combobox in a form to a query and get the results for that month. If I would use November, I should get all the records that fall in November.
Is this possible? the field that I try to do this is called "pickup_date"

Greetings.
 
yes, you can.
if you only want to get to show
the query for this year:

select yourTable.*, Format([pickup_date],"yyyymmmm") As Expr1 From yourTable Where Format([pickup_date],"yyyymmmm") = Year(Date()) & [Forms]![yourFormName]![yourCombo]
 
Hi, it works really great, no clue it could be done this way :-)

Greetings
 

Users who are viewing this thread

Back
Top Bottom