[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Returning records from a combo box value on a form in Access 2010

Posted on 2011-04-28
2
Medium Priority
?
337 Views
Last Modified: 2012-05-11
I have a query that looks for a value in a text box on a form and returns records related to that value. I tried the same functionality using a combo box so the user could use a pull down list to select the value. The combo box contains values from a table I created. It does not work when using the combo box. The results are blank records. I've named the combo box what the text box was but no good...
What am I doing wrong?

Thanks
0
Comment
Question by:_Hector
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 2000 total points
ID: 35484248
Check the properties of the combo.
In particular look at the rowsource.  If you have used the wizard to create the combo then Access automatically includes the primary key field from the table but this will be hidden from view if you have chosen an additional field to display in the combo dropdown list.  When this happens the 'value' of the combobox is the primary key value, NOT the displayed value. You will see that the bound column is set to 1 which will be the ID field.
If this is what has happened, and you want to get the displayed value, rather than the ID value, then you can change the bound column to 2.




0
 

Author Comment

by:_Hector
ID: 35484295
That did it!

Thanks again!!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

826 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question