In an Access database, I'm trying to read the values of a field [Request ID] from a query [isOverdue] from a table [Table1] in my database [Database01]. Right now, [isOverdue] returns three records with [Request ID] values of 4, 5, and 10. I'm trying to read those values from the query's recordset and store them in a string. Code follows (this is VBScript, btw):
Dim returnString
Const strQueryName = "isOverdue"
Dim db, rs
Set db = ?????
Set rs = db.OpenRecordset(strQueryName)
Do While Not rs.eof
If returnString <> "" Then returnString = returnString & ","
returnString = returnString & rs.Fields("Request ID".Value
RS.MoveNext
Loop
rs.Close
db.Close
returnString should now have a value of {4, 5, 10}
I don't even know whether the above will work or not, but first, I can't figure out what I'm supposed to put where Set db = ????
Dim returnString
Const strQueryName = "isOverdue"
Dim db, rs
Set db = ?????
Set rs = db.OpenRecordset(strQueryName)
Do While Not rs.eof
If returnString <> "" Then returnString = returnString & ","
returnString = returnString & rs.Fields("Request ID".Value
RS.MoveNext
Loop
rs.Close
db.Close
returnString should now have a value of {4, 5, 10}
I don't even know whether the above will work or not, but first, I can't figure out what I'm supposed to put where Set db = ????