Combo Box will not input data into my query

  • Thread starter Thread starter neckface
  • Start date Start date
N

neckface

I'm trying to set up a combo box on my form to input data I select from the
drop down menu into a query and then have that query display the item
selected and the related information.

In summary, Combo box, choose item, item should display in a query along
with the other information relating to it.

At the moment it lets me choose from the items in the drop down menu, clears
the combo box and opens a query behind the form. However, the query is empty.
I assume it is not inputting the data from my combo box correctly into the
query.

The criteria i'm using in my query is this:

[Forms]![frm_Name]![cbo_Name]

frm_name and cbo_name are just substitutes for the names in my actual
database.

I'm not too experienced with access coding but I followed a guide down to
the letter with dismal results.

Any help on what I could be doing wrong would be gratefully appreciated.
I'm using Access 2007 in case that affects anything.


Thanks
 
What is displayed in the combo box is not always the value that is selected.
What I mean is you need to check the properties of the combobox to see if it
has a hidden column that is bound to the box but not displayed. An
alternative is to change the criteria of your query to something like
[Forms]![frm_Name]![cbo_Name].Column(1)
substitutaing the relevant column number to what is being displayed in the
combobox
 
Dennis, thanks for the prompt reply - unfortunately I still have problems.
When I change the query criteria to as suggested, it gives me an Error:
"3085" Undefined Function then spits back my expression, minus the column
number I chose;
"[Forms]![frm_Name]![cbo_Name].Column"

Any help is appreciated.
I'll check back on this topic tomorrow morning, time for bed I think!

Thanks
 
Dennis, thanks for the prompt reply - unfortunately I still have problems.
When I change the query criteria to as suggested, it gives me an Error:
"3085" Undefined Function then spits back my expression, minus the column
number I chose;
"[Forms]![frm_Name]![cbo_Name].Column"

Any help is appreciated.
I'll check back on this topic tomorrow morning, time for bed I think!

Thanks
 
Sorry, use the criteria
[Forms]![frm_Name]![cbo_Name].Text

neckface said:
Dennis, thanks for the prompt reply - unfortunately I still have problems.
When I change the query criteria to as suggested, it gives me an Error:
"3085" Undefined Function then spits back my expression, minus the column
number I chose;
"[Forms]![frm_Name]![cbo_Name].Column"

Any help is appreciated.
I'll check back on this topic tomorrow morning, time for bed I think!

Thanks


neckface said:
I'm trying to set up a combo box on my form to input data I select from the
drop down menu into a query and then have that query display the item
selected and the related information.

In summary, Combo box, choose item, item should display in a query along
with the other information relating to it.

At the moment it lets me choose from the items in the drop down menu, clears
the combo box and opens a query behind the form. However, the query is empty.
I assume it is not inputting the data from my combo box correctly into the
query.

The criteria i'm using in my query is this:

[Forms]![frm_Name]![cbo_Name]

frm_name and cbo_name are just substitutes for the names in my actual
database.

I'm not too experienced with access coding but I followed a guide down to
the letter with dismal results.

Any help on what I could be doing wrong would be gratefully appreciated.
I'm using Access 2007 in case that affects anything.


Thanks
 
Dennis, it works!!!!! Thank you.

Much love, it all works exactly as it should now.

Hopefully i can get the database finished on time - thanks to you, its
looking a lot more possible.

Thanks again

Dennis said:
Sorry, use the criteria
[Forms]![frm_Name]![cbo_Name].Text

neckface said:
Dennis, thanks for the prompt reply - unfortunately I still have problems.
When I change the query criteria to as suggested, it gives me an Error:
"3085" Undefined Function then spits back my expression, minus the column
number I chose;
"[Forms]![frm_Name]![cbo_Name].Column"

Any help is appreciated.
I'll check back on this topic tomorrow morning, time for bed I think!

Thanks


neckface said:
I'm trying to set up a combo box on my form to input data I select from the
drop down menu into a query and then have that query display the item
selected and the related information.

In summary, Combo box, choose item, item should display in a query along
with the other information relating to it.

At the moment it lets me choose from the items in the drop down menu, clears
the combo box and opens a query behind the form. However, the query is empty.
I assume it is not inputting the data from my combo box correctly into the
query.

The criteria i'm using in my query is this:

[Forms]![frm_Name]![cbo_Name]

frm_name and cbo_name are just substitutes for the names in my actual
database.

I'm not too experienced with access coding but I followed a guide down to
the letter with dismal results.

Any help on what I could be doing wrong would be gratefully appreciated.
I'm using Access 2007 in case that affects anything.


Thanks
 
Back
Top