Enable/Disable Not working

Losartan

Registered User.
Local time
Today, 16:29
Joined
Jul 21, 2005
Messages
39
I am creating a data entry form with combo boxes related to two different tables:
TblEducationID
EducationID - Auto# PK
Education - Text
TblMediaFill
MediaFillID - auto# PK
Incubation Time- text
Incubation Temp - text

In my form, I have a combo box that the user selects the Education Type (Media Fill Test; Aseptic Technique Observation, Watch Video, etc....)

I want the incubation time and temp text boxes to be disabled unless Media Fill Test (ID#4) is selected on the first combo box. (I get a Procedure Declaration does not match error.)

Private Sub EducationID_AfterUpdate()
If EducationID = 4 Then
IncubationTime.Enabled = True
IncubationTemp.Enabled = True
Else
IncubationTime.Enabled = False
IncubationTemp.Enabled = False
End If

End Sub

Any Suggestions? Thanks,
Jason
 
RE: enable / disable

Make sure that you reference the combo box name in the If statement

If EducationID = 4 Then

If comboboxname = 4 Then
 
The "EducationID = 4" statement is referencing the combo box. EducationID is the name of the combo box as well as the other objects in the code. Do I need to reference the tables the values are in? EducationID is in one table while the incubation information is in another?
 

Users who are viewing this thread

Back
Top Bottom