Eljefegeneo
Still trying to learn
- Local time
- Today, 02:44
- Joined
- Jan 10, 2011
- Messages
- 902
I am trying to get a list of birthdays for each the current month and the next month. I have a form to select either the criteria for the current month or the next month using a combo box, but when I try to pass this to the parameter query, I get nothing.
Query:
The two parameters are:
Month(Now))
Month(Now())+1
If I paste either of these into the query, the desired result is achieved. But when I run it using the criteria from the combo box, I get nothing but a blank query.
How do I get this to work?
Query:
Code:
SELECT tblMain.ClientID, ([Title]) & (" "+[FirstName]) & (" "+[MiddleName]) & (" "+[Surname]) & (" "+[NameSuffix]) AS Client, tblMain.ProgramTitle, tblMain.Birthday
FROM tblMain INNER JOIN qryOnAirActive ON tblMain.ClientID = qryOnAirActive.ClientID
WHERE ((Not (tblMain.Birthday) Is Null) AND ((Month([Birthday]))=[Forms]![frmBirthdaySelect]![Combo0]) AND ((qryOnAirActive.CustomerStatus)="Active"))
ORDER BY tblMain.Birthday;
Month(Now))
Month(Now())+1
If I paste either of these into the query, the desired result is achieved. But when I run it using the criteria from the combo box, I get nothing but a blank query.
How do I get this to work?