Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Checkbox sends program to other VBA form

Status
Not open for further replies.

jrice174

Civil/Environmental
Nov 8, 2004
129
0
0
US
I have a program that prints out a series of drawings. Since the user may want to only select a few of the available drawings, I have a checkbox that displays another form. This form lists checkboxes for all of the drawings with the checkbox caption being the drawing name. In order to have all of the checkboxes get checked or unchecked I have the following code.

Private Sub CheckBox1_Click()
For Each Control In Controls
If Left$(Control.Name, 3) = "cbx" And Control.Caption <> "" Then
If CheckBox1.Value = True Then Control.Value = True
If CheckBox1.Value = False Then Control.Value = False
End If
Next
End Sub

When I uncheck the boxes, it works great. When I check the boxes, it sends me back to the original form as if I have put frmPickDrawing.hide, frmMain.show.

Any idea what could make this happen?
 
Replies continue below

Recommended for you

Do you have any other code? What about your before or after update options is there any code listed in them? There has to be other code somewhere.


ck1999
 
Status
Not open for further replies.
Back
Top