Hi Chaps, I could use a hand if someone is versed in these matters! Essentially, I'm trying to use an MS Access form to provide the parameters of a query that builds a report based on these results. For the large part, it works well, but I have a problem that I can't seem to find a solution for - I'm sure it must be possible, but I'm probably just searching for the wrong words/terms! My problem is that I only want the form to pass the contents/parameters of a combo box/text box to the query if that control is enabled. Any ideas? Cheers, TSB
I think I get what you mean, for your query to use data you have pre-defined in a form, you need to break out of the SQL query to point to the desired form. It should look something like this. (Random example.) Code: strSQL = "SELECT * FROM tblJobs WHERE DateRaised BETWEEN #" & ConvertToAmericanFormat(Left(Forms!frmReports!axcFromDTpicker, 10)) & "# AND #" & ConvertToAmericanFormat(Left(Forms!frmReports!axcToDTPicker, 10)) & "# AND DateComp IS NULL AND AllocatedTo='" & Forms!frmReports!cboAllocatedTo & "' AND UserRaised='" & Forms!frmReports!cboIssuer & "'" The break is at the end when I have Combo box's defining criteria. '" & Form.formname.criteria &"' At work so only brief description, if you need more info post back and I'll get to when at home