Combo Box selection shows on re-open

JennPeek

New member
Local time
Today, 14:42
Joined
Jan 19, 2009
Messages
8
What I'm trying to do may be very complicated since I can't seem to find anything on it in this forum. I am trying to basically lock the selection that a user will make in a combo box. When the form is closed, I want it to re-open with the selection that the user made before closing. So far I've tried a few different Events but none of them do what I'd like. I'm hoping for some help.
 
you need to save the value in a global variable, (or in a table or in the registry)

then when you open the form you can restore the last setting

-------
but if the cbo box is bound, be careful because this will change the setting for the current record, not move to a different the selected record - so it depends on what oyu are trying to do
 
How might I go about doing that? I'm flying by the seat of my pants right now, I'm not too familiar with Access but I'm picking it up as I go.
 
If you're trying to save the data from a form, you probably save it in a table that the form links to. Use the control source of the combo box to link to the table, so the value selected will be stored in the table with all of your other form data. If you want to fill the combo box with selections that have been made in the past, you can even use sql in the row source of the combo box to pull the control field on the table that has been GROUPed BY.
 
Carlapet - That isn't working for me. I'm not sure if I'm doing something wrong though. I keep getting an error when I try to change the entry of the combo box. It won't let me select anything because it doesn't mesh with the table.
 
gemma-the-husky: The cbo is not bound. How do I restore the last setting? Or where do I put that code also?
 
Can anyone else help answer some of these questions? I'm still at a loss.
 

Users who are viewing this thread

Back
Top Bottom