maccten2000
Programmer
Hello Chaps,
I have a piece of code that loops through a recordset and builds a string. The recordset contains a list of errors on a production line for a particular manufacturer. My code is below.
So it should loop through it and when it finishes ProdStrMsg will have been built up and formatted correctly as below to be passed back as a variable to a different function
Item: 00005 - 001 Dups: 2
Item: 00006 - 001 Dups: 4
Item: 00007 - 001 Dups: 5
Item: 00008 - 001 Dups: 7
Unfortunatly i cant seem to get it to work
Can anyone help me out with my code
Cheers
I have a piece of code that loops through a recordset and builds a string. The recordset contains a list of errors on a production line for a particular manufacturer. My code is below.
Code:
Do Until RS1.EOF
ProdStrMsg = "Item: " & RS1!Code & " - " & RS1.Fields("Item").Value & " Dups: " & RS1.Fields("CountOfItem").Value
If Len(ProdStrMsg) > 0 Then ProdStrMsg = ProdStrMsg & vbCrLf
Loop
So it should loop through it and when it finishes ProdStrMsg will have been built up and formatted correctly as below to be passed back as a variable to a different function
Item: 00005 - 001 Dups: 2
Item: 00006 - 001 Dups: 4
Item: 00007 - 001 Dups: 5
Item: 00008 - 001 Dups: 7
Unfortunatly i cant seem to get it to work
Can anyone help me out with my code
Cheers