H
HUGH
WHAT V.B. CODE DO I REQUIRE TO: OPEN A TABLE AND READ EACH RECORD
SEQUENTIALLY TO THE END?
SEQUENTIALLY TO THE END?
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