Loop freezing database (1 Viewer)

JimH

Registered User.
Local time
Today, 05:34
Joined
Aug 15, 2004
Messages
19
Hello!

I am attempting to add a new section of code in an already exsisting and working unload event. This section of code was added immediatly after code which ran a query which created the tables I am now calling on. The tables are created fine, but the new code is not modifying the table as expected. Any help would be greatly appreciated. Thanks!

Dim db5 As DAO.Database
Dim rst5 As DAO.Recordset
Set db5 = CurrentDb

Set rst5 = db5.OpenRecordset("tblDailyA25AM", dbOpenTable)
While Not rst5.EOF And Not rst5.BOF
rst5.Edit
rst5("lname") = rst5("lname") & " (No AM)"
rst5.Update
rst5.MoveNext
Wend


Set rst5 = db5.OpenRecordset("tblDailyA25PM", dbOpenTable)
While Not rst5.EOF And Not rst5.BOF
rst5.Edit
rst5("lname") = rst5("lname") & " (No PM)"
rst5.Update
rst5.MoveNext
Wend
 

JimH

Registered User.
Local time
Today, 05:34
Joined
Aug 15, 2004
Messages
19
Nevermind, I had forgot to add a bit of code to make the table and if wasnt error trapped. Sorry
 

Users who are viewing this thread

Top Bottom