persistent value

  • Thread starter Thread starter Bill H.
  • Start date Start date
B

Bill H.

I have a form where a combo box selects a location (site).

I want that site (site table prikey) included in another table that tracks
attendees. No problem with that.

But I want that site selection to STAY in the combo box when I move to the
next record, or when adding a record.

How to do?
 
Bill,

Put the following code in the AfterUpdate event of the combobox:
Me!NameOfCombobox.DefaultValue = Me!NameOfCombobox
 
that works, sort of. :-)


The main body of the form is based on a query which includes the site table.
So, even though I select a site with the site combo box, if the next record
has a different site, that site shows up in the site select combo box! the
site combo box only goes back to the 'default' when I'm on a new record.

How do I stop that from happening?

wierd, to me.

PC Datasheet said:
Bill,

Put the following code in the AfterUpdate event of the combobox:
Me!NameOfCombobox.DefaultValue = Me!NameOfCombobox
 
You don't! That's the way it should work. If your combobox is a bound
control and a value was previously entered in the combobox for a given
record, each time you navigate to that record, the combobox is going to
display the previous value you entered. That's the way it is suppose to
work!!

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com


Bill H. said:
that works, sort of. :-)


The main body of the form is based on a query which includes the site table.
So, even though I select a site with the site combo box, if the next record
has a different site, that site shows up in the site select combo box! the
site combo box only goes back to the 'default' when I'm on a new record.

How do I stop that from happening?

wierd, to me.
 
Back
Top