B
Bott
I created a simple form with a combo box in the header that I would like to
use to select a Project ID Number from a Projects Table. Then I want the form
to update to the selected ProjectID. I have the following code in the Combo
box OnClick property.
Private Sub cboFilter_Click()
Dim strSQL As String
strSQL = "SELECT * FROM Projects " & _
"WHERE ProjectID = " & cboFilter.Column(0)
Debug.Print strSQL
Forms!ProjectsCombo.RecordSource = strSQL
End Sub
When I select the ProjectID in the Combo box I get a message box that asks
me to "Enter Parameter Value" and yet the value that I selected is shown. The
SQL query seems to be Okay as the Immediate window shows the correct Project,
but why am I getting this parameter value message.
Thanks in advance for any help you may have.
Brian
use to select a Project ID Number from a Projects Table. Then I want the form
to update to the selected ProjectID. I have the following code in the Combo
box OnClick property.
Private Sub cboFilter_Click()
Dim strSQL As String
strSQL = "SELECT * FROM Projects " & _
"WHERE ProjectID = " & cboFilter.Column(0)
Debug.Print strSQL
Forms!ProjectsCombo.RecordSource = strSQL
End Sub
When I select the ProjectID in the Combo box I get a message box that asks
me to "Enter Parameter Value" and yet the value that I selected is shown. The
SQL query seems to be Okay as the Immediate window shows the correct Project,
but why am I getting this parameter value message.
Thanks in advance for any help you may have.
Brian