IF all records are null statement

chris_visible

Registered User.
Local time
Today, 18:02
Joined
Jan 17, 2002
Messages
24
How can I use VBA to find if a field in a continuous form is null in any row.
I can find the first row using the following:

If me![Combo13].ListIndex = -1 Then

I would like to know how to do this for a set of records and express if any are null Then …….

I want this to use in an IF statement that checks whether a user has entered a value in every row of a form.

Any help would be great.

Thanks
 
Have you considered creating a query for this purpose? Maybe set criteria to Is Null and reference the query in your code.
 
Use:
Sub IsItFilledOut()
on error goto errhandler

If IsNull(Me![Combo13].value) or (Me![Combo13].Value = "" Then
' Msgbox "This field has diddly in it"
Else
' Exit Sub
endif

Exit_errhandler:
exit sub
errhandler:
msgbox err.number & " Description: " & err.description
resume Exit_errhandler

End sub

Or, set the field property to required

Cheers,

Dave


[This message has been edited by David Mack (edited 02-27-2002).]
 

Users who are viewing this thread

Back
Top Bottom