I am trying to find out if the customer id is already in the table:
Set dbs = CurrentDb()
str = "SELECT [CUSTOMER DATA].* FROM [CUSTOMER DATA];"
Set rst2 = dbs.OpenRecordset(str)
If Me![CustAcctID] = rst2!CustAcctID Then
MsgBox "This Customer already exists in the database", vbCritical
Can someone help me with my syntax?
Set dbs = CurrentDb()
str = "SELECT [CUSTOMER DATA].* FROM [CUSTOMER DATA];"
Set rst2 = dbs.OpenRecordset(str)
If Me![CustAcctID] = rst2!CustAcctID Then
MsgBox "This Customer already exists in the database", vbCritical
Can someone help me with my syntax?