Disable Sub Form

E

eric.nguyen312

Hi, I have a subform I would like disabled when a "Job Closed"
checkbox is checked on the main form. The subform also contains a dbl
click event for each textbox that opens up another form. I would like
to have that disabled too when the "Job Closed" checkbox is checked.
Can someone please help me on this? Thank you.
 
S

SusanV

Hi Eric,

I use something like this also, here's the code I use, (this disables data
entry and click events, but leaves the data viewable). Change the control
names for YourCheckbox and YourSubFormName as required:

If Me.YourCheckbox = True Then
Me.YourSubFormName.Enabled = False
Else
Me.YourSubFormName.Enabled = True
End If
 
E

eric.nguyen312

Hi Eric,

I use something like this also, here's the code I use, (this disables data
entry and click events, but leaves the data viewable). Change the control
names for YourCheckbox and YourSubFormName as required:

If Me.YourCheckbox = True Then
Me.YourSubFormName.Enabled = False
Else
Me.YourSubFormName.Enabled = True
End If



Susan, thanks for the reply. Which event do I post the code in?
Sorry, im a noob.
 
S

SusanV

Oh sorry! Put that code in the form's On Current Event, so that it runs
automatically when users change records.
 
E

eric.nguyen312

Oh sorry! Put that code in the form's On Current Event, so that it runs
automatically when users change records.


It works! Thank you so much for your help.

Eric
 
E

eric.nguyen312

Glad to help any time

;-D


Another question. I have four textboxes on the main form that also
has the dbl click event that opens the same form. How would I disable
that when the "Job Closed" checkbox is checked. I tried using the
same code you gave me, but no success. Thanks
 
E

eric.nguyen312

Another question. I have four textboxes on the main form that also
has the dbl click event that opens the same form. How would I disable
that when the "Job Closed" checkbox is checked. I tried using the
same code you gave me, but no success. Thanks
nm i got it
 

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