Go to your VBA form and check if Microsoft DAO 3.6 Object Library is selected under Tools, Reference menu.
If you only wanted to check if a name already exists in a record, why not try the DCOUNT Function? Look under Help for more details.
dim intCount as integer
intCount =...
The single quote is used when you use string types. I think that LoanNumber is of type Integer so the single quotes are not needed. Try this:
If DCount("[LoanNumber]", "tblLoanInfo", "[LoanNumber] = " & Me![loannumber]) > 0 Then
MsgBox "Duplicate...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.