Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query problems with a combo box

Status
Not open for further replies.

Jennpen1

Technical User
Sep 4, 2002
57
US
I know this has a simple solution, but I am having some major problems with it. What I have is a table that contains two fields, one called "terminals" and one called "work area." The data in the terminals fields are not unique. In other words, for each unique terminal field there are roughly 25 unique work area fields. What i need to do is have a form that has a box where the user can type in a terminal name, and then a combo box that shows all of the work areas associatedwith that terminal number. I have tried setting it up so that the combo box reads from a query but I keep getting the error message "No value given for one or more required parameters." I am very rushed and need this done ASAP. Any help would be greatly appreciated!!!!!!!!
 
Try something like this (where txtFieldTerminalNumber is the name of the field the user enters the terminal number in). The first one example assumes Terminal Number is a number. The second example assumes Terminal Number is a text field (string)

ComboBox.RowSource = "Select WorkArea From YourTable Where TerminalNumber = " & txtFieldTerminalNumber

Or if TerminalNumber is a text field, then

ComboBox.RowSource = "Select WorkArea From YourTable Where TerminalNumber = '" & txtFieldTerminalNumber & "'"
 
It worked!!!!! You have no idea how much you have helped me!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top