S
Steve P
I have a combo box on a form whose selected value I'd like to use as a
variable to populate the criteria for a query I've written.
How do I do this???
So far, I've manually created a new label object that I've set to
"invisable" so that the text value from the combo box can be set to the
label's caption.
Upon the form loading, I want the code to check the value of its label's
caption and store that value in a variable to be used as criteria....but its
not working! I keep getting an error message saying that one of the forms
cannot be found. What am i doing wrong???
Here is the code I'm using on the command button that will store the combo
box's value and attempt to set the opening form's label caption...there must
be a better way to do this....
Private Sub cmdSelectEntity_Click()
[Forms]![frmAuditEntitySelector]![cboEntityName].[SelText] =
[Forms]![frmCommentAddEntity]![lblentitypass]![Caption]
DoCmd.Close acForm, "frmAuditEntitySelector"
DoCmd.Close acForm, "frmSwitchboard"
DoCmd.OpenForm "frmCommentAddEntity", acNormal, "", "", , acNormal
End Sub
variable to populate the criteria for a query I've written.
How do I do this???
So far, I've manually created a new label object that I've set to
"invisable" so that the text value from the combo box can be set to the
label's caption.
Upon the form loading, I want the code to check the value of its label's
caption and store that value in a variable to be used as criteria....but its
not working! I keep getting an error message saying that one of the forms
cannot be found. What am i doing wrong???
Here is the code I'm using on the command button that will store the combo
box's value and attempt to set the opening form's label caption...there must
be a better way to do this....
Private Sub cmdSelectEntity_Click()
[Forms]![frmAuditEntitySelector]![cboEntityName].[SelText] =
[Forms]![frmCommentAddEntity]![lblentitypass]![Caption]
DoCmd.Close acForm, "frmAuditEntitySelector"
DoCmd.Close acForm, "frmSwitchboard"
DoCmd.OpenForm "frmCommentAddEntity", acNormal, "", "", , acNormal
End Sub