Hello,
i have a question regarding checkboxes, is it possible to load textbox values when a checkbox is clicked? For example i have 2 checkboxes, if chbox1 is clicked i want to run qry1 and load txtbox1, txtbox2, txtbox3, if chkbox 2 is clicked i want to run qry2 and load txtbox1, txtbox2, txtbox3. If both chkbox 1 and 2 are clicked then run qry3 and load txtbox1, txtbox2, txtbox3
i have 4 different checkboxes and there can possibly be 14 different types of posibilities to load the 3 textboxes.. i was thinking of doing the following but i dont know how to say to load the text boxes that are on the form.. can someone please help? Also if there a better way to do this then to do 14 If Then statements?
Private Sub Command16_Click()
If chkbox1.Value = True Then
DoCmd.OpenQuery "qry1"
End If
If chkbox2.Value = True Then
DoCmd.OpenQuery "qry2"
End If
If chkbox1.value = True And chkbox2.Value = True Then
DoCmd.OpenQuery "qry3"
End If
End Sub
thank you,
Summer
i have a question regarding checkboxes, is it possible to load textbox values when a checkbox is clicked? For example i have 2 checkboxes, if chbox1 is clicked i want to run qry1 and load txtbox1, txtbox2, txtbox3, if chkbox 2 is clicked i want to run qry2 and load txtbox1, txtbox2, txtbox3. If both chkbox 1 and 2 are clicked then run qry3 and load txtbox1, txtbox2, txtbox3
i have 4 different checkboxes and there can possibly be 14 different types of posibilities to load the 3 textboxes.. i was thinking of doing the following but i dont know how to say to load the text boxes that are on the form.. can someone please help? Also if there a better way to do this then to do 14 If Then statements?
Private Sub Command16_Click()
If chkbox1.Value = True Then
DoCmd.OpenQuery "qry1"
End If
If chkbox2.Value = True Then
DoCmd.OpenQuery "qry2"
End If
If chkbox1.value = True And chkbox2.Value = True Then
DoCmd.OpenQuery "qry3"
End If
End Sub
thank you,
Summer