Hi,<BR><BR><BR><BR>I have a search form with a couple of (unbound) text and combo boxes. In order to collect data from them I made variable strFilter, and then I apply that variable on my form or report and I get filtered data. That works fine......<BR><BR>The problem is that I need to send all these filtered data to Word. As far as I know I have to have table or query which is my data source. So I put new variable sql which represents query with tree tables together (on this query I need to apply filter)and then I add filter to it so I get filtered query which is OK when I print it. But I kon&#039;t know how to proceed.....<BR><BR>If I put <BR>DoCmd.OpenForm "ResultForm", , , sql, acFormReadOnly<BR>and press the button it says : Syntax error in expression "SELECT Organization.*, [Contact Person].*, Project.*, .............<BR><BR>Any ideas?<BR><BR>Thanks<BR><BR>This is my code........ <BR><BR>I&#039;m using Access 2000<BR><BR><BR><BR><BR><BR><BR>Private Sub cmdSearch_Click()<BR>On Error GoTo Err_cmdSearch_Click<BR>Dim strFilter As String<BR>Dim sql<BR><BR>strFilter = ""<BR>sql = "SELECT Organization.*, [Contact Person].*, Project.*, [AmountProjectedInCash]+[AmountProjectedInKind]+[AmountRequested] AS [Projected Total Cost], [ActualInCash]+[ActualInKind]+[AmountApproved] AS [Actual Total Cost] FROM Organization INNER JOIN ([Contact Person] INNER JOIN Project ON [Contact Person].PersonID = Project.PersonID) ON Organization.OrganizationID = [Contact Person].OrganizationID WHERE "<BR><BR>If Not IsNull(Me!cboScope) Then strFilter = strFilter & "[Scope]=" & Chr(34) & Me!cboScope & Chr(34) & " AND "<BR>If Not IsNull(Me!frmPriorityStatus) Then strFilter = strFilter & "[PriorityStatus]=" & Me!frmPriorityStatus & " AND "<BR>If Not IsNull(Me!frmApprovalStatus) Then strFilter = strFilter & "[ApprovalStatus]=" & Chr(34) & Me!frmApprovalStatus & Chr(34) & " AND "<BR>If Not IsNull(Me!txtProjectNumber) Then strFilter = strFilter & "[ProjectID]=" & Me!txtProjectNumber & " AND "<BR>If Not IsNull(Me!cboContactName) Then strFilter = strFilter & "[Name]=" & Chr(34) & Me!cboContactName & Chr(34) & " AND "<BR><BR>Debug.Print strFilter<BR><BR><BR>If strFilter = "" Then<BR>MsgBox "There is no matching data", vbInformation<BR>Else<BR>strFilter = Left$(strFilter, Len(strFilter) - 5)<BR>sql = sql + strFilter<BR>Debug.Print sql<BR><BR>DoCmd.OpenForm "ResultForm", , , strFilter, acFormReadOnly<BR>