vb variables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

have a series of check boxes on a form such as check box 1 labelled bhn,
check box 2 labelled dme, check box 3 labelled amb

when any of these boxes are checked, want to store the value in a vb
variable. for example, if the first one is checked, the value in the variable
would be bhn.

then i want to take that variable and use in a query.

how can i do this? i was trying to use case in vb code and then when the box
is checked, take a numeric value and give the text value in the variable. but
then i could not get the query to see the variable.

thanks for your help
 
jnewl said:
have a series of check boxes on a form such as check box 1 labelled bhn,
check box 2 labelled dme, check box 3 labelled amb

when any of these boxes are checked, want to store the value in a vb
variable. for example, if the first one is checked, the value in the variable
would be bhn.

then i want to take that variable and use in a query.

how can i do this? i was trying to use case in vb code and then when the box
is checked, take a numeric value and give the text value in the variable. but
then i could not get the query to see the variable.


Instead of using a VBA variable, put the value om a hidden
text box. Then change the query to check the hidden text
box using this kind of syntax:
Forms!formname.hiddentextboxname
 
thanks

Marshall Barton said:
Instead of using a VBA variable, put the value om a hidden
text box. Then change the query to check the hidden text
box using this kind of syntax:
Forms!formname.hiddentextboxname
 
Back
Top