'Month' in Combobox

klix

Registered User.
Local time
Yesterday, 16:14
Joined
Apr 1, 2009
Messages
46
Hello, I'm having trouble getting results from a form that I want to ask for the month. I have a table with a date field formatted dd/mm/yyyy and a query which pulls records including the dates. For my form, I'd like it to have a combobox with a dropdown of each month so that I can view all the records for a particular month.

I've tried this: I created a new table with numbers 1-12 and a formula on the query ( month: month([TDate]) ) then wrote [Forms]![formname]![combobox] in the criteria. Then I used the table with the numbers as my control for the combobox. But I get no results. I've done the same thing but with the month names rather than numbers - no results either.

I'll also mention that I have another combobox on the form which pulls the data of another field. But I also have a separate form which has two comboboxes as well, so I know I can properly design a form with two parameters. The problem must be with getting the form to properly display the month of the [TDate] from the main table.

I'd appreciate any help.
 
The Month() function returns the month number what you need is MounthName(Month([TDate])) this will return the name of the month.
 
It worked. I don't know how I hadn't tried that myself (well, I did but in a roundabout way). Thanks!
 

Users who are viewing this thread

Back
Top Bottom