Critique of code

D

David F Cox

Set rs = db.OpenRecordset("SELECT * FROM `mydatabase`")

rs.movefirst '? I am really rusty, but I vaguelly recall doing this
While Not rs.EOF
MsgBox rs.Fields(0).Value
rs.MoveNext
etc
 
G

Greg

David,

Thanks for the effort. I tried that as well as rs.moveprevious.

For whatever reason, the code is convinced that "Bill" is the first
record in the set ;-(
 
B

Bob Phillips

Greg,

Just re-read this thread. Name will never be returned as it is being read as
the column name, not part of the dataset. If you want the column name, you
have to use

rs.Fields(1).Name

etc.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

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