I have a function written in which I want a table to open and the code to halt until the table is closed. It's a rather long program but just to give an idea of where I am at here is some sample code:
Function Check()
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("Table1"
DoCmd.OpenTable "Table1", acViewNormal, acEdit
Do Until rst
Loop
DoCmd.SetWarnings False
DoCmd.DeleteObject acTable, "Table1"
DoCmd.SetWarnings True
End Function
I will be writing the data to another table later (not shown here) but I want the user to have access to this data before it deletes. If there anything I can do to pause the code until Table 1 is closed? Thanks for your help.
Function Check()
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("Table1"
DoCmd.OpenTable "Table1", acViewNormal, acEdit
Do Until rst
Loop
DoCmd.SetWarnings False
DoCmd.DeleteObject acTable, "Table1"
DoCmd.SetWarnings True
End Function
I will be writing the data to another table later (not shown here) but I want the user to have access to this data before it deletes. If there anything I can do to pause the code until Table 1 is closed? Thanks for your help.