Hi Everyone
i would like to check a record exits before a new entry is saved. However i would like to check on three criterias and i am not sure on how to write the if statement.
IF Dcount "CompanyName" & "FirstName" & "Last Name" from "tblcustomer" is the same as "frmCompanyName" & "frmFirstName" & "frmLastName" > 0
Then
Msgbox "This Customer Already Exists"
Cancel = True
frmcompanyname.setfocus
End IF
Could someone please translate it into the correct code?
Many Thanks
i would like to check a record exits before a new entry is saved. However i would like to check on three criterias and i am not sure on how to write the if statement.
IF Dcount "CompanyName" & "FirstName" & "Last Name" from "tblcustomer" is the same as "frmCompanyName" & "frmFirstName" & "frmLastName" > 0
Then
Msgbox "This Customer Already Exists"
Cancel = True
frmcompanyname.setfocus
End IF
Could someone please translate it into the correct code?
Many Thanks