I have a query:
Code:
SELECT dbo_jobs.JobID, dbo_jobs.JobNumber, dbo_jobs.JobDescription, dbo_jobs.JobLocation, dbo_subdivisions.SubdivisionName, dbo_jobs2surveys.SurveyID
FROM dbo_subdivisions INNER JOIN (dbo_jobs INNER JOIN dbo_jobs2surveys ON dbo_jobs.JobID = dbo_jobs2surveys.JobID) ON dbo_subdivisions.SubdivisionID = dbo_jobs.SubdivisionID
WHERE (((dbo_jobs2surveys.SurveyID)=[Forms]![Search Form]![cb_Survey]));
I have a form that consists of a combobox "cb_Survey", a button that applies the forms filter and a detail section that I need to populate with the results from the query. Here is the code run by the button.
Code:
Private Sub btn_RunQuery_Click()
lb_SearchStatus.Caption = "Search results for the survey of " & Me.cb_Survey
Me.Filter = "([SurveyID]='" & Me.cb_Survey & "')"
Me.FilterOn = True
End Sub
When the button is clicked the label is updated, but nothing happens to the detail area.
The form's "Record Source" is set to the query and the "Control Source" of the items in the detail section are set to the appropriate fields from the query set in the form's "Record Source".
I'm lost, please help!