Default Value in Combo Box

rishi3881

New member
Local time
Tomorrow, 01:42
Joined
Jun 19, 2007
Messages
5
There is a unbound combobox in the form. Where Data Tab Contains following informations.
Row Source Type : Value List
Row Source : 2060;2062;2063;2064;2065
Default Value : 2064
--------------------------------------------------
Problem is,
When new value is selected from the combobox eg. 2063 this value should be assigned as Default Value till next value is not selected.
Thanks for any support.
The Row Source value is fixed (2060;2062;2063;2064;2065) and it will never change.

thanks for help
 
there are probably better ways of doing this but how about:

1) create a small pop up form with a single field and make it invisible,
2) on the OnChange event of the cbobox assign the value selected to the field in the pop up form
3) refer to this field when the value is needed

Dave
 
Any code that i can apply directly on OnChange event for the field?
 
How about this -

In the AfterUpdate event for the combo box, you would put this:

Me.YourComboBoxName.Default = Me.YourComboBoxName
 
Now, that won't hold when you close the database and come back. You could only do that if you change it in design mode OR if you create a table to hold the value and use a DLookup to set the default when the form loads and then rely on the code I gave you for the After Update event in that After Update event. Then, in the form's unload event update the table with the current value.
 

Users who are viewing this thread

Back
Top Bottom