Query by Month problems

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all, I'm having quite an issue trying to get a query working and was
hoping someone here could help out.

I am querying a table which holds a date field (refdate) by allowing the
user to select the month from a combobox named rptdate which is populated
from another table/query with the design of ( MthID, MthName ), so line #1 is
| 1 | January | when the monthlist table is opened.

The query I have now uses the expression :
rptmonth: Format$([refdate], 'mmmm') with a criteria of
[Forms]![rptcrit].[rptdate]

This works marvelously for January but as soon as the month on the input
form is changed to anything but January, I get no results from the query.
Any ideas what I'm doing wrong here?
 
Make sure your combo box is bound to the first column and have values 1-12
in the column. Then change RptMonth to the expression:
rptmonth: Month([RefDate])
You shouldn't need to change data values to text.
 

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

Back
Top