Vulcan1500
Registered User.
- Local time
- Today, 17:06
- Joined
- Nov 13, 2007
- Messages
- 143
In MS Access 2003 I have a form with a listbox and combobox. The listbox gives me records regarding expenses and with the combobox I can select a year. After selecting a year the listbox is filtered and is giving only the records for that year. So far things are doing as expected.
Now I want to print the filtered list. For that reason I built a query in SQL, but the Where clause is my problem.
In the query I have a column Year: Format([Date],'yyyy') and the Where clause is WHERE "QueryName.Year = '" & Me.ComboboxName & "'". After running this the database is asking for a value for QueryName.Year.
If I add e.g. 2008 it gives me all records. When I run the query only and add 2008 to that column as a filter it is giving me the correct results.
Now I want to print the filtered list. For that reason I built a query in SQL, but the Where clause is my problem.
In the query I have a column Year: Format([Date],'yyyy') and the Where clause is WHERE "QueryName.Year = '" & Me.ComboboxName & "'". After running this the database is asking for a value for QueryName.Year.
If I add e.g. 2008 it gives me all records. When I run the query only and add 2008 to that column as a filter it is giving me the correct results.