Criteria referencing control on form not working

SirStevie3

Registered User.
Local time
Today, 15:23
Joined
Jul 29, 2013
Messages
58
I cannot figure this out as i've done it before the exact same way with my other database and it works just fine...

I have a form (named frmAddSession) with a combo box (named Band_Name) and lets say i have it displaying the band "Band A"

I have a query where the criteria is [Forms]![frmAddSession]![Band_Name]. when i run the query the results are blank. but if i type ="Band A" it works just fine.

why won't my reference to the combo box on the form work?

ps. in a series of deductions to try and figure this out, my form only has the one combo box, and my query is based on only one table and only has the one field.
 
Is the bound column of the combo perhaps an ID field rather than the name?
 
No I don't believe so, I used the combo box wizard and pointed it directly to a text field.
 
Show the query string.
 
SELECT tblArtist.Band_Name
FROM tblArtist
WHERE (((tblArtist.Band_Name)=[Forms]![frmAddSession]![Band_Name]));

sorry im not familiar with the terminology... is this what you mean?
 
Your query string looks okay.
But are you 100% sure the name of the combo box is "Band_Name", check it.
Another way to control it is, run your form, open the query in design, place the cursor in the criteria, click the icon
attachment.php
choose the form and the respective control.
Else post a striped version of your database with some sample data, (zip it if you haven't post 10 post).
 

Attachments

  • Builder1.jpg
    Builder1.jpg
    1.5 KB · Views: 174

Users who are viewing this thread

Back
Top Bottom