I have the following function that I am calling through a query. It works fine except that I wanted it to combine with the CommodityID field (which it is doing) but also the SID field.
Dim rst As DAO.Recordset
Dim strCombinePD As String
Set rst = CurrentDb.OpenRecordset("SELECT [" & strGetField & "] FROM [" & strTable & "] WHERE [" & strIDField & "]=" & strIDValue)
While Not rst.EOF
strCombinePD = strCombinePD & rst(strGetField) & " "
Set rst = Nothing
If strCombinePD <> " " Then strCombinePD = Left$(strCombinePD, Len(strCombinePD) - 1)
shnCombinePD = strCombinePD
How I am calling it in the query:
This is combining all the BuyerCodePD according to the CommodityID but I would like it to use the SID field as the criteria as well.
It is late here and I cannot see the forrest for the trees :). Thanks in advance for something that I imagine is very simple :)