If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Multiple Condition If Then... possible?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-26-12, 11:46
bradreynolds bradreynolds is offline
Registered User
 
Join Date: Jul 2011
Posts: 30
Multiple Condition If Then... possible?

Is it possible to perform multiple onclick or afterupdate events on checkbox option frames where (for example) if frame20 is 'yes' (1) and frame21 is also 'yes' then textbox22 is disabled?
Reply With Quote
  #2 (permalink)  
Old 07-26-12, 12:44
pbaldy pbaldy is offline
Registered User
 
Join Date: May 2005
Location: Nevada, USA
Posts: 2,658
Not clear on the question, but you can certainly have:

If Me.Frame20 = 1 And Me.Frame21 = 1 Then
__________________
Paul
Reply With Quote
  #3 (permalink)  
Old 07-26-12, 14:34
sps sps is offline
Registered User
 
Join Date: Aug 2004
Location: Cary, NC
Posts: 264
I'm also not positive what you are asking but I'm going to add a couple observations just the same....

Why do you have option frames with yes/no choices in them instead of using a checkbox that is inherently yes/no? The danger with using a frame and then testing the value for a condition, is it depends on the option values of the controls in the frame. A checkbox however, will always return the same values, 0 for unchecked and -1 for checked (or null if you have triple state set to true)

You can then safely use these values to test for conditions. Since they are numbers you can even use them directly if you care to.

The following statement would enable the text box if both checks are true and disable it otherwise (with Triple State = No). You can just put it in the after update event of your checkboxes.

Code:
textbox22.enabled = check1 * check2
Then again, I could be way off from what you are asking!
__________________

Steve
Reply With Quote
Reply

Tags
if then, multiple conditions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On