|
-
Mar 27th, 2007, 07:32 AM
#1
Thread Starter
New Member
[RESOLVED] 2 Fields in combo box.
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|