i have an command button over an openup form to open an another form,
i want the form to enable and disable under conditions
(1) whenver specified textboxes not filled /wrong data used
(2) whenever typed data deleted
how to get through this please
i used, event form current()
if isnull(text1) then msgbox("fg")
command1.enable=false
elseif isnull(condition2) theb msgbox("gh")
command1.enable=false
else command1.enable=true
but the command1 is getting disabled but not getting enabled again?
Steve Schapel - 18 Jun 2007 11:01 GMT
Balu,
Try like this...
If IsNull(Me.text1) Then
MsgBox "fg"
Me.Command1.Enabled = False
ElseIf IsNull(condition2) Then
MsgBox "gh"
Me.Command1.Enabled = False
Else
Me.Command1.Enabled = True
End If

Signature
Steve Schapel, Microsoft Access MVP
> i have an command button over an openup form to open an another form,
> i want the form to enable and disable under conditions
[quoted text clipped - 8 lines]
> else command1.enable=true
> but the command1 is getting disabled but not getting enabled again?