sql statement

G

Guest

I have a form that has a listbox on it along with 2 combo boxes. One combo
box gives the year and the other gives the month. The list box show the
results of the combo box selections. When I do the year, it shows the proper
number of records. Then when I want to drill down to a month within the
selected year, I get a pop box asking for the month. On the pop up the month
is displayed above the input box. Below is what I am using for the after
update of the combo box.

Me.lstClaimNumber.RowSource = _
" SELECT " & _
" SurveyResponseID, " & _
" Month, " & _
" Year, " & _
" ClaimNumber " & _
" FROM usrtblSurveyResponses " & _
" WHERE Year = " & Forms![usrfrmSurveyResponses]![cboSurveyYear] & _
" AND Month = " & Forms![usrfrmSurveyResponses]![cboSurveyMonth] & _
" ORDER BY ClaimNumber;"

If anyone can see the error, please let me know. It only occurs when I ask
for the month. Even if I have the Month line before the Yearline.
Thanks to anyone who can assist.
*** John
 

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

Top