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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question on Combo Box

Status
Not open for further replies.

dmorse

Programmer
Oct 5, 2004
27
US
I have a table for security. The format is Unique ID, Network ID, and Dept ID. On loading the switchboard, I have the user id stored in variable txtUserID using the environ("username"). I created query qryDeptSecurity that prompts txtUserID.

In the combo box properties, I have row source type as table/query and row source as qryDeptSecurity . When I run the switchboard, the correct data is in the dropdown, but when I click on a line, the data is not populated in the box as being selected.

What am I missing? TIA for any assistance...
 
You don't want to have a prompted parameter for a dropdown source. You can generate the sql for the dropdown in the load, including:
WHERE Userid = '" & txtUserid & "'"
as the query's where clause, and requery the combobox.
--Jim
 
I removed the query from the control, and moved it to the Form_Open and assigned the sql statement at that time. Is that what you are talking about? With this way the box is loaded with the options again, but I still can't select an option and get it to show as selected.
 
I still can't select an option and get it to show as selected.
Not sure what you mean by this. If it's a Dropdown/Combobox, then when you click it, then when you let go, what remains in the box is, if memory serves, the first visible column from the left looking at the Select statement--regardless of the Bound column. So what will show in the combo box after a selection will be the left-most column in the select statement.
--Jim
 
The problem I am having is that I can click and highlight the selection, but the drop down doesn't close and the selected information doesn't show in the box above. It is a combo box. Sorry it took so long to get back to you. I was on vacation. Thanks again...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top