Have been given a form with a combo box which no longer works.
The combo box is to show one instance of each string found in a field for ever record in a table.
For example:
This would appear to be simple.
This works but shows duplicates.
However when I attempt to use Group By this creates the error
[red]"Invalid Procedure Call"[/red]
The Group By code was created by the QBE grid.
It does not matter if everything is in one query or I query the query which creates the duplicates (no Group By).
This would seem to be something you should be able to accomplish, any suggestions?
The combo box is to show one instance of each string found in a field for ever record in a table.
For example:
Code:
For records
"ABC-12345"
"ABC-67890"
"DEF-12345"
"DEF-67890"
should return
"ABC"
"DEF"
one instance of everything to the left of the Dash.
This would appear to be simple.
This works but shows duplicates.
Code:
SELECT Left$([tblNTIs]![NTINumber],InStr(1,[NTINumber],"-",1)-1) AS [Left of Dash]
FROM tblNTIs;
So I get
"ABC"
"ABC"
"DEF"
"DEF"
However when I attempt to use Group By this creates the error
[red]"Invalid Procedure Call"[/red]
The Group By code was created by the QBE grid.
Code:
SELECT Left$([tblNTIs]![NTINumber],InStr(1,[NTINumber],"-",1)-1)
FROM tblNTIs
GROUP BY Left$([tblNTIs]![NTINumber],InStr(1,[NTINumber],"-",1)-1);
It does not matter if everything is in one query or I query the query which creates the duplicates (no Group By).
This would seem to be something you should be able to accomplish, any suggestions?