T
ttthello
I am trying to write an "onClick" function for a button that will chec
whether a field in the form is a valid record in a table.
There are some error during compilation and I'm not sure if th
following is correct:
Private sub cmdSubmit_Click ()
Dim rst As Recordset
Set rst = CurrentDB.Openrecordset ("Select [field1] fro
Tablename")
rst.MoveFirst
Do
Debug.Print rst.MoveNext
Loop Until rst![Field1] = Me!Fieldname
DoCmd.OpenForm ("New Form")
End Su
whether a field in the form is a valid record in a table.
There are some error during compilation and I'm not sure if th
following is correct:
Private sub cmdSubmit_Click ()
Dim rst As Recordset
Set rst = CurrentDB.Openrecordset ("Select [field1] fro
Tablename")
rst.MoveFirst
Do
Debug.Print rst.MoveNext
Loop Until rst![Field1] = Me!Fieldname
DoCmd.OpenForm ("New Form")
End Su