I am trying to see if a customer ID is already in the table before adding a new one...
This is what I have so far...
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("Customer Data"
If Me![CustAcctID] = rst![CustAcctID] Then
MsgBox "This Customer already exists in the database", vbCritical
Else
rst.AddNew
rst![CustAcctID] = Me![CustAcctID]
rst.Update
Any suggestions on what I am doing wrong?
Thank you!
This is what I have so far...
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("Customer Data"
If Me![CustAcctID] = rst![CustAcctID] Then
MsgBox "This Customer already exists in the database", vbCritical
Else
rst.AddNew
rst![CustAcctID] = Me![CustAcctID]
rst.Update
Any suggestions on what I am doing wrong?
Thank you!