R
Ripper
I am attempting to use this code to DLookup a field before it is updated.
However, I cannot seem to get my syntax correct around the "[StuID]='" &
Me.StuID &'" area. StuID is set as a number field in tblStudents.
If ((DLookup("[StuID]", "[tblStudents]", "[StuID] ='" & Me.StuID & '")))
Then
MsgBox "This Student ID number is already used. Please Check ID or look
in History From.", vbOKOnly, "Student ID Already Exists"
End If
However, I cannot seem to get my syntax correct around the "[StuID]='" &
Me.StuID &'" area. StuID is set as a number field in tblStudents.
If ((DLookup("[StuID]", "[tblStudents]", "[StuID] ='" & Me.StuID & '")))
Then
MsgBox "This Student ID number is already used. Please Check ID or look
in History From.", vbOKOnly, "Student ID Already Exists"
End If