G
Guest
WHAT V.B. CODE DO I REQUIRE TO: OPEN A TABLE AND READ EACH RECORD
SEQUENTIALLY TO THE END?
SEQUENTIALLY TO THE END?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Ofer said:Without shouting
Open a recordset and loop through the records
Dim MyDB as Database, MyRec as Recordset
' Open the mdb
Set MyDB=CodeDb()
' Open the table
Set MyRec=MyDb.OpenRecordset("Select * From TableName")
' Loop
While not MyRec.Eof
(The loop place)
MyRec.MoveNext
Wend
While in code, Select in the menubar > tools > reference
See if you have reference to Microsoft DAO 3.6, if not add it, or
youll get error message.
Ofer said:Hi Dirk, I work with several mdb's connected to each other by
reference, for some reason all the mdb's that on second level of
reference the currentdb gave me an error, so I had to change all of
them to codedb, which worked great, so I assume there are pluses and
minuses for each thechnique.
So you can call it a habit, that I write my code that way
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.