I need to find out why this code will not work in Access2000.
Private Sub Text3_Click()
If DCount("[lname]", "lookup_lname1") = 0 Then
MsgBox "There are no records with that last name"
Forms![new_records].Visible = True
DoCmd.OpenForm "main data input"