Query to a report

hooby1

Registered User.
Local time
Today, 08:08
Joined
May 9, 2004
Messages
48
How would I got about with this problem. What would the code be for this command button. I have got two combo boxes that contain Month(cbo_Month) and Year(cbo_Month) and located in them are month names and month number e.g. Jan 1 Feb 2 etc and year 2002 02 2003 03 etc in 2 columns. These are on a form that the user selects the month and year they want to show the expiry date of that item and then clicks on a command button that will look at a query with the expiry date column to show the results. For example there is a item that expires and the end of June 03. So the user goes to the form and selects Month Jan and Year 03 from the combo boxes and then clicks on the command button and this will then show a report with this item. I have tried everything with this and have ground to a halt. Hope this can be solved or guided. Have tried dateserial. Also what happens when they want the month Feb when it is a leap year. Any examples would be a help. Cheers
 
It should be as simple as passing the cbo's criteria to the query.
But I think we may need more info

the expiry date is this a date/time field or text?
do you have a seperate field for month and year for the expiry date?
 
See if this helpsDate Part
 
Cheers for the reply.
That example you gave sort of shows what Im after but not quite.
How exactly do you pass the cbo's criteria to the query, would you use code on a command button to do this. The expiry date is a date/time field and no it is just one field for the expiry date.
 
Something like this in the criteria for the expriy field in the query

Forms!YourFormName!YourCbo
 

Users who are viewing this thread

Back
Top Bottom