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

preloading combo box window

Status
Not open for further replies.

jrf

Technical User
Jan 4, 2001
15
US
I am creating a form that uses a combo box result to provide a criteria for the query on a second combo box. I works just fine but the second combo box window remains blank with all the retreved rows exposed when the arrow is clicked. I would like the first retreived item (98% what is used) to pop into the combo box window so it may be skipped over if the selection is correct.

Thank you
 
Sorry, Terry, but I couldn't make this work for what I want. What I'm after is -- as I exit the first combo box, the first row item pops into the window of the second combo box, already visibile when the cursor gets there. I have no trouble getting the correct info into the second combo rows, just cannot get it into the window without a specific selection. Using the itemdata(x) as the default data item as suggested by the help system not only does not put anything into the window, it removeds the combo box's ability to accept a selection from its drop down box. So, I still looking
 
It appears I misunderstood. You want the combo2 list to be visible. Try this.

me.combo2.setfocus
me.combo2.dropdown

Put this logic in the combo1 "After Update" or "Lost Focus" event.

If this doesn't work give us a little more info.

1- Are both combo boxes on the same form?
2- If so what happened when you do as I suggested? Terry
 
In the meantime, can I make a suggestion?

You make a selection from Combo1, which then supplies (filters) the data for combo2, but combo2 is not showing that data until you click on it, right?

Try inserting a docmd.requery into the afterupdate for combo1.
 
Terry,

Both combo boxes are on the same form. Entering your code in the afterupdate of the first combo box drops the cursor to the second box window and opens the dropdown list. However, it doesn't put anything into the window, and interestingly enough, the second combo box accepts only the first row as the result no matter which row is selected.

I don't know why.

John
 
Believe it or not, I had the requery already in there so I remain with the results above.

I'll check back in the am but I'll be thinking about this all night. The microsoft help for combo boxes specifically states there is no data in the combo box window until the arrow is clicked and a row selected. While there is the itemdata, it doesn't work that I can see.

John
 
Hello...
I am creating a form that has 4 combo boxes and a subform.

1. vp level
2. Director level
3. Manager level
4. City

After entering all the information in all four comboboxes the information appears in the subform...great.
What I would like to see is for the information to show up in the subform after I select VP level first. If the users wants a further break down then they can select the Director level which would only limit to data to this selection....and so on.

Ultimately what I would really want is for the *All* selection to appear from the pull down selection or as a default in the ComboBox. This way if I want to find all the information for people in Dallas I get this from the pull down for city and leave the other 3 combo boxes with the default ALL. If I want Director Smith and City Paris I can just select them from the corresponding pull down and leave the rest with the All option.

Thanksss
Alexander

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top