enable a field in a form

T

tgavin

I have a check bos on a form that I needt o disable unless certain fields are
filled in. Working with just one field initially, I put in:

Private Sub booReady_Click()
If intService = 0 Then
Me!booReady.Enabled False
Else
Me!booReady.Enabled True
end If

But it keeps giving me the error "the object does not support this proberty
or method"

I don't know how else to do it. Help?

Terri
 
B

Beetle

For starters, you can't disable a control in it's own Click event because
the control in question would have the focus. You would need to do it in
the After Update event of the other control, or in the Current event of
the form. For example;

Private Sub Form_Current ()

Me!booReady.Enabled = Me!intService <> 0

End Sub

_________

Sean Bailey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top