S
Sergio Reis
I've a long time problem that I can't solve
1. I´ve got a back end table where the records are saved in VBA like this::
Public Function teste()
Dim MyTable As DAO.Recordset, MyDatabase As DAO.Database
Set MyDatabase = OpenDatabase("\\Codrvr05\qual\Processo\test.mdb")
Set MyTable = MyDatabase.OpenRecordset("Process")
..
MyTable.Index = "primaryKey"
...
MyTable.AddNew
MyTable![Record1]=forms![form1]![a]
MyTable.update
MyTable.Close
MyDatabase.Close
DoCmd.OpenReport "Final_Report", acViewPreview
Exit function
The report is in the front aplication based on the Linked MyTable.
THE PROBLEM IS that most of the times the report goes empty because, I
think, it opens before the information is "truly" saved and so available. To
get around this problem I sometimes put a MsgBox after the MyDatabase.Close
and before the DoCmd.OpenReport ( in order to get same delay, giving some
time so that the report gets the information)
Is there any way of assuring the report information (without using the
HasNodata Report Propertie), delaying the OpenReport action until the
information is realy available?
1. I´ve got a back end table where the records are saved in VBA like this::
Public Function teste()
Dim MyTable As DAO.Recordset, MyDatabase As DAO.Database
Set MyDatabase = OpenDatabase("\\Codrvr05\qual\Processo\test.mdb")
Set MyTable = MyDatabase.OpenRecordset("Process")
..
MyTable.Index = "primaryKey"
...
MyTable.AddNew
MyTable![Record1]=forms![form1]![a]
MyTable.update
MyTable.Close
MyDatabase.Close
DoCmd.OpenReport "Final_Report", acViewPreview
Exit function
The report is in the front aplication based on the Linked MyTable.
THE PROBLEM IS that most of the times the report goes empty because, I
think, it opens before the information is "truly" saved and so available. To
get around this problem I sometimes put a MsgBox after the MyDatabase.Close
and before the DoCmd.OpenReport ( in order to get same delay, giving some
time so that the report gets the information)
Is there any way of assuring the report information (without using the
HasNodata Report Propertie), delaying the OpenReport action until the
information is realy available?