checking for empty fields

O

Ofer Cohen

Create a function within the form that check if the fields has data

Function CheckField() As Boolean
If IsNull(Me.[Field1]) Or IsNull(Me.[Field2]) Or IsNull(Me.[Field3]) Then
CheckField = False
Else
CheckField = True
End if
End Function

================
On the After Update event of each relavant field, run the code

Me.[ButtonName].Enabled = CheckField
 
S

segurarl

Where should I put the function?

Thank you very much!

Ofer Cohen said:
Create a function within the form that check if the fields has data

Function CheckField() As Boolean
If IsNull(Me.[Field1]) Or IsNull(Me.[Field2]) Or IsNull(Me.[Field3]) Then
CheckField = False
Else
CheckField = True
End if
End Function

================
On the After Update event of each relavant field, run the code

Me.[ButtonName].Enabled = CheckField

--
Good Luck
BS"D


segurarl said:
Using a form, how can I make the OK available only after some fields have data?
 
Top