Hi,

I have a combo box acting as a filter for a form which contains data from 2 seperate fields using the following SQL code:

SELECT tblData.Field1 FROM tblData GROUP BY tblData.Field1 UNION SELECT tblData.Field2 FROM tblData GROUP BY tblData.Field2;

This combo box works fine in showing the data from both fields and when I select data from Field1 it gives me the correct results in my form. However when I select data from Field2 i get no results.

I currently have the following VB code and was wondering how I would implement Field 2 into it:

If Not IsNull(Me.cboFilter1) Then
strWhere = strWhere & "([Field1] = """ & Me.cboFilter1 & """) AND "
End If

Many thanks.