Hi, after resourcing my Runtime 3075, I've now backed into this one.
I'm trying to check a condition that a user has a previous certificate type and then pop the User to show the condition. Print is a yes/no field, ID fields are numeric. Have I got this right? Appreciate any help it's almost 2am here..
I'm trying to check a condition that a user has a previous certificate type and then pop the User to show the condition. Print is a yes/no field, ID fields are numeric. Have I got this right? Appreciate any help it's almost 2am here..
Code:
stDocName = "frmTrainee"
stLinkCriteria = "[TraineeID]=" & Me![TraineeID]
If CertTypeID = 2 Then
Answer = DLookup("[CertTypeID]", "[tblCertificate]", "[TraineeID]= " & Me.TraineeID _
& " And [CertTypeID] = 1" _
And [Print] = -1)
If Not IsNull(Answer) Then
MsgBox "Standard Certificate exists.", vbOKOnly, "Standard"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End If