jmiller79
Posts: 1
|
| Posted: 07/20/2007, 7:37 AM |
|
Not sure why this is not working, Anyone have any input..
pretty much looking to validate Name and Company, If the 2 already exists in the db then do not insert the record and show the error
I have this on my before insert
Dim whname
Dim whcompany
Dim intMatch
whname = wh_users.wh_name.Value
whcompany = wh_users.wh_company.Value
intMatch = CCDLookUp("count(*)", "wh_users", "wh_name = " & whname & " AND wh_company = " & whcompany, DBConnection1)
If Len(intMatch) > 0 Then
wh_users.Errors.AddError "Already in DB."
End If
|