J
juxey2000
Hi there.
I have a form which is effectively 4 forms in one. Depending on which buttons
you press, various firlds become visible or not visible and disabled
depending on whether they are required for that particular incident.
I would like to validate the form for null values before submitting and I
have tried this validation loop.
dim myObject as object
dim myCollection as collection
For Each myObject in myCollection
If isNull(myObject.Value) Then
Msgbox("Field can not be null, bla bla bla")
myObject.setFocus
end if
Next
However, I only want it to check for null values in visible/enabled fields
only. I have tried playing around with the code but I'm not that good with
VBA. I'm hoping it's an easy answer.
Cheers.
I have a form which is effectively 4 forms in one. Depending on which buttons
you press, various firlds become visible or not visible and disabled
depending on whether they are required for that particular incident.
I would like to validate the form for null values before submitting and I
have tried this validation loop.
dim myObject as object
dim myCollection as collection
For Each myObject in myCollection
If isNull(myObject.Value) Then
Msgbox("Field can not be null, bla bla bla")
myObject.setFocus
end if
Next
However, I only want it to check for null values in visible/enabled fields
only. I have tried playing around with the code but I'm not that good with
VBA. I'm hoping it's an easy answer.
Cheers.