Hi, hope someone can help,
I have a front-end form with a combo box (called ‘Combo_Team’), which also has a button on it. When the button is pressed I run the following piece of code on the click event…
Private Sub BTN_Forms_ToDoLists_Click()
Dim strTeam As String
Me!Combo_Team.SetFocus
strTeam = Me!Combo_Team.Text
MsgBox (strTeam)
DoCmd.OpenForm "FRM_Animations_Main", , , Creater = strTeam
End Sub
…you can see from this that I am trying to open another form but I am trying to use what is in the combo box as a ‘WHERE’ clause to restrict the entries in the form.
This is not working. The form I am trying to open has an entry called ‘Creater’ on it (it is a list of peoples names) I am trying to restrict the forms entries to that of one person. The message box tells me that I am getting the correct string from the combo box but when the form is opened all of the records are filtered even the ones with the persons name I have selected (from the combo) in the ‘Creater’ field.
Please help!
Mark Simmons
I have a front-end form with a combo box (called ‘Combo_Team’), which also has a button on it. When the button is pressed I run the following piece of code on the click event…
Private Sub BTN_Forms_ToDoLists_Click()
Dim strTeam As String
Me!Combo_Team.SetFocus
strTeam = Me!Combo_Team.Text
MsgBox (strTeam)
DoCmd.OpenForm "FRM_Animations_Main", , , Creater = strTeam
End Sub
…you can see from this that I am trying to open another form but I am trying to use what is in the combo box as a ‘WHERE’ clause to restrict the entries in the form.
This is not working. The form I am trying to open has an entry called ‘Creater’ on it (it is a list of peoples names) I am trying to restrict the forms entries to that of one person. The message box tells me that I am getting the correct string from the combo box but when the form is opened all of the records are filtered even the ones with the persons name I have selected (from the combo) in the ‘Creater’ field.
Please help!
Mark Simmons