Guest User

Untitled

a guest
Jul 18th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. Private Function get_cms_shipments() As String
  2. Dim db As Database
  3. Dim rs As Recordset
  4. Dim Shipments As String
  5.  
  6.  
  7. Set rs = db.OpenRecordset("SELECT qryInspectionExceptionReport_VCE.[Packing List Number] AS CMSShipments FROM qryInspectionExceptionReport_VCE GROUP BY qryInspectionExceptionReport_VCE.[Packing List Number];")
  8.  
  9. rs.MoveFirst
  10. Shipments = ""
  11.  
  12. While Not rs.EOF
  13. Shipments = Shipments & rs(0)
  14. rs.MoveNext
  15. If Not rs.EOF Then
  16. Shipments = Shipments & ", "
  17. End
  18. Wend
  19.  
  20. rs.Close
  21. Set rs = Nothing
  22.  
  23. End Function
Add Comment
Please, Sign In to add comment