records to report detail

T

Tony Piperato

Greetings,

I am opening a recordset and would like to print the results in a report
detail section to the txtDateStart and txtDateStop text boxes. I have the
following code:

Do Until rsMyRS.EOF
txtDateStart = rsMyRS("DateStart")
txtDateStop = rsMyRS("DateStop")
rsMyRS.MoveNext
Loop

There are nine records in this particular recordset (there could be
infinitely more), but I only get the first records' values printed nine
times instead of EACH individual record. Any thoughts?

Thanks in advance for your help.

Tony
 
L

Leonard Selmani

Do Until rsMyRS.EOF
txtDateStart = rsMyRS("DateStart")
txtDateStop = rsMyRS("DateStop")
rsMyRS.MoveNext
Loop

--How are you opening your recordset? Are you selecting *
from....

What's with the txtDateStart? Try Debug.Print (rsMyRS
("DateStart")), otherwise you're replacing the value of
the text box with the next record every time. Post the
rest of the code so I can see what you're trying to do.
The loop seems to be fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top