I have created a summary recordset by combining data from multiple SQL tables. This bit of code takes this recordset and uses it to populate a dropdown box for the user to select the material they want to plan.
The Sort command is commented out as it causes and error saying this function cannot be used here
The display I get ,without the sort , shows mutiple records for the same material types and I want it to have just one entry for each qualifying record.
I hope you can help
'Call function to populate material selection combo.
'Populate the material selection combo box
If .State = adStateClosed Then .Open
If .RecordCount > 0 Then
'.Sort = "Material ASC"
Do While Not .EOF
strMatl = !Material
If strMatl <> strLastMatl And strMatl <> "" Then
strLastMatl = strMatl
MsgBox ("There are no items needing planning at this time")