cooldisk2005
Technical User
All,
I am having problems with this query on a certain part:
The code is behind a command button on a search form.
Everything works well except for the following code on page 7:
If Not IsNull(Me.sortFile) And Me.sortFile<> 0 Then
strOrder = strOrder & "tbl_Products.name asc, "
strSQL = strSQL & ", tbl_Products "
strWhere = strWhere & " tbl_PAF.MainID = tbl_Products.MainID AND"
End If
On the search form there is a radio button for the above.
tbl_Products.name is a subform field that can have a lot of data for that field.
If I choose the radio button on the search form along with some other search criteria on the form, the results come back with duplicate records. The amount of duplicate records always equals the amount of subform data is in the tbl_Products.name field. For instance if there are 5 records in this field, the results would yield 5 duplicate records.
How can I fix this problem?
Any help would be DEFINITELY appreciated.
Thanks,
I am having problems with this query on a certain part:
The code is behind a command button on a search form.
Everything works well except for the following code on page 7:
If Not IsNull(Me.sortFile) And Me.sortFile<> 0 Then
strOrder = strOrder & "tbl_Products.name asc, "
strSQL = strSQL & ", tbl_Products "
strWhere = strWhere & " tbl_PAF.MainID = tbl_Products.MainID AND"
End If
On the search form there is a radio button for the above.
tbl_Products.name is a subform field that can have a lot of data for that field.
If I choose the radio button on the search form along with some other search criteria on the form, the results come back with duplicate records. The amount of duplicate records always equals the amount of subform data is in the tbl_Products.name field. For instance if there are 5 records in this field, the results would yield 5 duplicate records.
How can I fix this problem?
Any help would be DEFINITELY appreciated.
Thanks,