List box help

rem2088

Registered User.
Local time
Today, 05:38
Joined
Aug 17, 2004
Messages
15
Hello all, I need some help with a list box.

I created a DB that is used to keep track of packages being delivered to our office. So anyways, I have a drop down box that has a list of people who receive packages at our office. What I want to know is how do I keep one person's name selected in the box when it moves from record to record?

If I select "bob" in the drop down list, I want bob to be the default in that drop down box until the form is closed. When it is opened back up and a new name selected, I want the same thing to happen.

Thanks for you help in advance.

-Ben
 
One way

A cheesy way to do this would be to add a new unbound text box where the value gets updated whenever the combo box changes. So the onchange event of the cbo box would place a new value in the text box. In the OnCurrent event of the form you can do the vice versa where the text box replaces the value in the cbo box. You can make the txt box invisible so it does not show on the interface.
 
Thank you for your responce, I am able to get the text box to auto populate with the selected contence of the list box, but I cannot get the info to go back to the list box once a new record is created.

-Ben
 
event

the oncurrent event of the FROM should have the code to apply the text box value to the cbo or list:

sub frmForm1_oncurrent
cboValue = txtBoxValue
end sub

If that does not work check to see if you can find another event property of hte form or from a button that will allow you to have this text field updated. hope that helps?
 
Well, everything still resets when it goes to the next record. I'm not having much luck with this :(
 
Well, I just when ahead and did it another way. Insted of trying to get the combo box to retain its settings, I made another combo box on the main form that you choose your name with. Then I set the default value of the sub form combo box to it and it seems to be working.

-Ben
 

Users who are viewing this thread

Back
Top Bottom