Perhaps someone in this group smarter than me can help me with this
problem. On a data entry form, I have placed a command button to
"close" the form when the user is finished entering the required data.
To make sure the user enters complete data in every text control, I
have set the button's "enabled" state to false when the form loads. I
have placed the following code in the form's general code section.
Other than the command button, the controls on the form consist of two
text boxes and one combobox in that order. I call the following
subroutine from each of the control's "OnChange" Events, but it does
not change the command button's state to "enabled." I've tried calling
the procedure from other control events like AfterUpdate, Dirty, etc.,
but no luck.
Thanks
Scott
Dim frmName As String
Dim ctl As Control
Dim X As Boolean
frmName = Me.Name
For Each ctl In [Forms]!frmName
If IsEmpty(ctl) Or IsNull(ctl) Then
X = False
End If
Next ctl
cmdDone.Enabled = X