data validation in two tables

mrdx07

New member
Local time
Yesterday, 16:02
Joined
Jun 24, 2010
Messages
4
validate 1st table to 2nd table if 1st table records exist in 2nd table the record will not be recorded.(validate that say " the record is already exist in table2)

table1 and table2 has same filds

:confused:
 
If Dcount("*", "table2", "key=" & keyvalue) > 0 then
msgbox "Record already exists", vbOKOnly, "Validation"
exit sub
End If

Or are you wanting something more than this?
 

Users who are viewing this thread

Back
Top Bottom