I posted earlier about a similar problem and got some useful help, so I thought I'd try this one here too. I'm a beginner, so please be gentle.
I have a very simple form-based query set up. The form is called 'frmTeams', and the query is called 'qryOpenTagsByTeam'. The form has a single combo-box (named 'cboTeam') with 'OK' and 'Cancel' command buttons. All the user needs to do is select a choice from the combo-box and click OK. This should start the query and use whatever the user selected in the combo box into the query criteria.
I have the 'OK' command button linked to the query with the following VBA code:
Private Sub cmdOK_Click()
DoCmd.OpenQuery "qryOpenTagsByTeam", acViewNormal, acEdit
End Sub
In the query I have the following Criterion:
[Forms]![frmTeams]![cboTeam]
What happens is that the query opens, but it shows no data. I have the form open, so that's not the problem. After going through many books, I can't figure out why it's not working like it should. Any help would be most appreciated.
I have a very simple form-based query set up. The form is called 'frmTeams', and the query is called 'qryOpenTagsByTeam'. The form has a single combo-box (named 'cboTeam') with 'OK' and 'Cancel' command buttons. All the user needs to do is select a choice from the combo-box and click OK. This should start the query and use whatever the user selected in the combo box into the query criteria.
I have the 'OK' command button linked to the query with the following VBA code:
Private Sub cmdOK_Click()
DoCmd.OpenQuery "qryOpenTagsByTeam", acViewNormal, acEdit
End Sub
In the query I have the following Criterion:
[Forms]![frmTeams]![cboTeam]
What happens is that the query opens, but it shows no data. I have the form open, so that's not the problem. After going through many books, I can't figure out why it's not working like it should. Any help would be most appreciated.