Dear All,
I have been having a problem with the following code:
The error occurs of the highlighted line. My basic idea is to check whether the primary key (Solar Lantern No) is not duplicated.
Can anyone tell me where the problem is...??
Thaning you in advance
Sajit
I have been having a problem with the following code:
Code:
Private Sub Solar_Lantern_No_AfterUpdate()
Dim vCheckEntry As Boolean
[B]vCheckEntry = DLookup("[Solar Lantern No]", "Beneficiary", "[Solar Lantern No] = " & Me.Solar_Lantern_No)[/B]
If vCheckEntry = True Then
MsgBox "Solar Lantern NO. already exists. Please change it.", vbInformation, "Beneficiary"
Cancel = True
Me.Solar_Lantern_No.SetFocus
Else
Me.Name_of_the_Beneficiary.SetFocus
End If
End Sub
Can anyone tell me where the problem is...??
Thaning you in advance
Sajit
Comment