Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code ignoring checkbox values

Status
Not open for further replies.

merlynsdad

Programmer
Nov 18, 2010
175
0
0
US
I have a form with 11 check boxes, each representing an identical Oracle db that should be run in a loop if the box is checked. So if ATLANTA is checked I want to include the Atlanta db, if Austin is checked I want to include Austin, etc. All of the ODBC is ok, as it's running perfectly elsewhere in this module. What's supposed to happen is I open the form, the user checks the boxes he wants, and the code then runs the corresponding dbs. Problem is, the code is ignoring the status of the check boxes if true, and showing every one false. Pertinent test code is as follows:

DoCmd.OpenForm "Select_ACD"
If chkAtlanta = True Then MsgBox ("Run code for Atlanta")

I'm not playing with records so I don't have a record source on the form; the status of the check box is simply routing the code, preferably in a case structure if I can get that working. But first, how do I get the check boxes to work?



If the square peg won't fit in the round hole, sand off the corners.
 

This code:

DoCmd.OpenForm "Select_ACD"
If chkAtlanta = True Then MsgBox ("Run code for Atlanta")

Do you have it in the Form where your checkboxes are - Button_Click event or something like that?

Or do you have it in Module1 (stand alone module)?

Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top