Moving through Records

Results 1 to 2 of 2

Thread: Moving through Records

  1. #1
    K.Zig Guest

    Default Moving through Records

    I have a query string that is inside a loop. My code looks like<BR><BR>do while roomnum &#060; 4<BR>roomnum = roomnum + 1<BR><BR>"connction and recordset stuff here<BR><BR>query=(Select Stime, Etime from project where Room = "&#039Roomnum&#039"<BR><BR>other code<BR><BR>loop<BR><BR>It returns the values of the recordset "roomnum 1" three times for two loops and then four times on the last one.<BR><BR>What am I doing wrong?

  2. #2
    Join Date
    Dec 1969

    Default RE: Moving through Records

    Try this... roomnum is a variable right... so you want to value of it to be in the query string, not the vaiable name itself..<BR><BR>"connction and recordset stuff here (before the loop)<BR><BR>do while roomnum &#060; 4<BR>roomnum = roomnum + 1<BR><BR>query=(Select Stime, Etime from project where Room = " & Roomnum<BR>&#039Execute....<BR><BR>other code<BR><BR>loop<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts