Auto Pick from Value List based on CheckBox

G

Guest

I have a Value List in a field, that I want to automatically pick "N/A" if:

CheckBox1 is checked AND Checkbox2 is checked.

If both are checked, the Value List should choose "N/A" and the user should not be able to change the field and the tab should just bypass that field

Thank you in advance.
 
B

Blaire Comrie

Public Function ChkBox(ValueOne As Boolean, ValueTwo As Boolean) as Boolean
Dim State As Long
State = ValueOne + ValueTwo
Select Case State
Case -2
MsgBox "Both True"
'Code to respond goes here
Case -1
MsgBox "One True One False"
'Code to respond goes here
Case 0
MsgBox "Both False"
'Code to respond goes here
End Select
End Function

--
Hope this helps.
Blaire
http://www.codewidgets.com

Sara said:
I have a Value List in a field, that I want to automatically pick "N/A" if:

CheckBox1 is checked AND Checkbox2 is checked.

If both are checked, the Value List should choose "N/A" and the user
should not be able to change the field and the tab should just bypass that
field.
 
G

Guest

Sorry, I'm not a programmer, so I don't understand what to put where you say "code to respond here"

Could you be more specific? Thanks

----- Blaire Comrie wrote: ----

Public Function ChkBox(ValueOne As Boolean, ValueTwo As Boolean) as Boolea
Dim State As Lon
State = ValueOne + ValueTw
Select Case Stat
Case -
MsgBox "Both True
'Code to respond goes her
Case -
MsgBox "One True One False
'Code to respond goes her
Case
MsgBox "Both False
'Code to respond goes her
End Selec
End Functio

--
Hope this helps
Blair
http://www.codewidgets.co

Sara said:
I have a Value List in a field, that I want to automatically pick "N/A if
should not be able to change the field and the tab should just bypass tha
field
 

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