aaabuhalime
Instructor
Hi all,
This question is based on my questions in the past threads, I want to see how can I do the following, I want to be able to disable the "Wt1" filed in my form once a value entered in this field/ value exists for that student, so I want to continue using the following criteria,
CODE --> vb
Select Case Me.WhoIsIt
Case "Student"
Select Case Me.Status
Case "Active"
Wt1.Enabled = True
else
Wt1.Enabled = True
I want also to check if there is a value entered/exists in Wt1 field for that student, if yes then it disables Wt1 field, the value shows in the filed, I am trying the following code in the before update behind Wt1 field
CODE --> vb
Private Wt1_BeforeUpdate(Cancel As Integer)
Dim Check As Variant
Check = DLookup("[Wt1]", "queryxx", "[Wt1] = '" & Me.Wt1 & "'")
If Not IsNull(Check) Then
Me.Wt1.Enabled=True
else
Me.Wt1.Enabled=False
End If
End Sub
I know I am missing something, I cant figure out how to link the three condition together, studentID, and Status, and if the value exists.Can use While statement?if not what would be the best way to achieve my goal.
Any help will be appreciated.
This question is based on my questions in the past threads, I want to see how can I do the following, I want to be able to disable the "Wt1" filed in my form once a value entered in this field/ value exists for that student, so I want to continue using the following criteria,
CODE --> vb
Select Case Me.WhoIsIt
Case "Student"
Select Case Me.Status
Case "Active"
Wt1.Enabled = True
else
Wt1.Enabled = True
I want also to check if there is a value entered/exists in Wt1 field for that student, if yes then it disables Wt1 field, the value shows in the filed, I am trying the following code in the before update behind Wt1 field
CODE --> vb
Private Wt1_BeforeUpdate(Cancel As Integer)
Dim Check As Variant
Check = DLookup("[Wt1]", "queryxx", "[Wt1] = '" & Me.Wt1 & "'")
If Not IsNull(Check) Then
Me.Wt1.Enabled=True
else
Me.Wt1.Enabled=False
End If
End Sub
I know I am missing something, I cant figure out how to link the three condition together, studentID, and Status, and if the value exists.Can use While statement?if not what would be the best way to achieve my goal.
Any help will be appreciated.