How verify checkboxes? (1 Viewer)

pepok4

Registered User.
Local time
Today, 22:20
Joined
Jan 10, 2013
Messages
14
Hi all,
I have very little progamming experience with Access. I want ask, how I can verify checkboxes in form. I have 3 checkboxes (NoError, Error1, Error2). I want use rule, that not allow me check checkboxes. I´m using MS Access 2007.

Rules:
If I check "NoError" then "Error1" And "Error2" must be unchecked.
If I check "Error1" Or "Error2" then "NoError" must be unchecked.

Many thanks!
 

pepok4

Registered User.
Local time
Today, 22:20
Joined
Jan 10, 2013
Messages
14
Welcome to the Forum.

Rather than three separate box use an Option Group this will Auto-magically do exactly what you want.

Hi John,
thank you for your reply, but it don´t solve my situation. I would like to work with checkboxes.

Option group - at the same time can be in the group selected option always only one choice. I need combine my choice, see above in second rule is logical OR.

For example:
1.case
NoError - Yes/No
-------------------
Error1 - Yes/No
Error2 - Yes/No

2. case
NoError - Yes/No
-------------------
Error1 - Yes/No
Error2 - Yes/No

3. case
NoError - Yes/No
-------------------
Error1 - Yes/No
Error2 - Yes/No

4. case
NoError - Yes/No
-------------------
Error1 - Yes/No
Error2 - Yes/No

Thanks.
 

boblarson

Smeghead
Local time
Today, 13:20
Joined
Jan 12, 2001
Messages
32,059
One way - create a procedure in the form's module:

Code:
Function ValidateChkBxs
   If Me.chkNoError Then
      Me.chkError1 = False
      Me.chkError2 = False
      Exit Function
  End If
 
  If Me.chkError1 OR Me.chkError2 Then
     Me.chkNoError = False
  End If
 
End Function

Then in the AFTER UPDATE event of all three of the checkboxes paste:

Code:
ValidateChkBxs
 
Last edited:

pepok4

Registered User.
Local time
Today, 22:20
Joined
Jan 10, 2013
Messages
14
One way - create a procedure in the form's module:

Code:
Function ValidateChkBxs
   If Me.chkNoError Then
      Me.chkError1 = False
      Me.chkError2 = False
      Exit Function
  End If
 
  If Me.chkError1 OR Me.chkError2 Then
     Me.chkNoError = False
  End If
 
End Function
Then in the AFTER UPDATE event of all three of the checkboxes paste:

Code:
ValidateChkBxs

Hi boblarson,

Thank you very much. It works great for me!!!
 

Users who are viewing this thread

Top Bottom