Form Event to disable a checkbox

  • Thread starter mls via AccessMonster.com
  • Start date
M

mls via AccessMonster.com

I want to disable FINAL (check box field) if certain products are selected in
my PRODUCT text box.

Ex:

Me.Product in(‘one ‘,’two’,’three’ ) then
Me.final.enabled =false
Else Me.Final.enabled = true

So my question is: what form event is best to include this condition?
 
F

fredg

I want to disable FINAL (check box field) if certain products are selected in
my PRODUCT text box.

Ex:

Me.Product in(¡one ¡,¢two¢,¢three¢ ) then
Me.final.enabled =false
Else Me.Final.enabled = true

So my question is: what form event is best to include this condition?

Use the [Product] AfterUpdate event.
If Me.[Product] = "One" Or Me.[Product] = "Two" or Me.[Product] =
"Three" Then
Me.[Final].Enabled = False
Else
Me.[Final].Enabled = True
End If

If you had more choices it might be better to use a Select Case
statement.
 
B

Barry A&P

Possibly also put it in the forms Current event so it will work when using
the navigation buttons??

Barry
 
M

mls via AccessMonster.com

Actually I have 10 - 12 choice. How can I use select case?
Also I am having problems with continuing to next line.. I am using " & _
and it gives me compile error.
 
M

mls via AccessMonster.com

works perfectly if this is placed in Form_Current() &
result_reported_AfterUpdate() events..
If Me.[product] = "one" _
Or Me.[product] = "two" _
Or Me.[product] = "three" _

Thank you
 

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