Referring 1st record in the subForm

  • Thread starter Thread starter paul
  • Start date Start date
P

paul

Hi,
For my Access 2000 application, i tried to validated
data, to check whether the user entered at least one
record in the subForm.
I put:
if IsNull(Forms![MainForm]![subForm]![Emp_no] then
msgbox "............"
, it works fine. But if user after input the 1st record,
moved the cursor to second record, then error message pop
out.
How can I refer to the 1st record when I validated the
data?
Thanks a lot.
 
This code should tell you if there are no records in the subform from the
main form:

If Me![subForm].Form.RecordsetClone.RecordCount = 0 Then
 
Back
Top