View Full Version : Update field based on value in Combo


bevans
06-08-2000, 09:09 AM
I think I'm close to getting this, but something's missing.

I've got a form with a combo box, and would like to either Require or Enable one or more text fields based on the value selected in the Combo.
I think my best option is to use Select Case in the AfterUpdate event for the Combo. (although I've been wrong before)
One of two things happens depending on the code I use. Either those fields become enabled for all the future records (and I only want it for the current record) or nothing happens at all!

Any help would be great. This forum is a life saver!

Travis
06-08-2000, 12:11 PM
To keep the field from being enabled when you go to a different record you should do a call to the Afterupdate event of the combo box from the Form_Current Event. This will set it to the appropriate value

Example:

Private Sub Form_Current()
call ComboField_AfterUpdate
End Sub