I have a client that reported a problem with a report not having the correct data. The report is based on a table that is recreated in the OnOpen event, using a make table query.
When they ran the report it showed data from about a month ago. They then closed the report and reran it and this time the data was correct.
Any ideas why it would do this?
The code that recreates the table is this:
Private Sub Report_Open(Cancel As Integer)
On Error GoTo Err_NoTable
DoCmd.SetWarnings False
DoCmd.DeleteObject acTable, "Table Name"
DoCmd.OpenQuery "MakeTable Query Name"
DoCmd.SetWarnings True
Exit_Report_Open:
Exit Sub
Err_NoTable:
If ObjectExists(acTable, "Table Name" = False Then
DoCmd.OpenQuery "MakeTable Query Name"
End If
End Sub
Also this database is on a Terminal Services server and is accessed remotely through Terminal Services.
The main problem the client has is that they have no way of knowing if the data is correct or not.
They just happened to catch it this time on this report.
Tom
When they ran the report it showed data from about a month ago. They then closed the report and reran it and this time the data was correct.
Any ideas why it would do this?
The code that recreates the table is this:
Private Sub Report_Open(Cancel As Integer)
On Error GoTo Err_NoTable
DoCmd.SetWarnings False
DoCmd.DeleteObject acTable, "Table Name"
DoCmd.OpenQuery "MakeTable Query Name"
DoCmd.SetWarnings True
Exit_Report_Open:
Exit Sub
Err_NoTable:
If ObjectExists(acTable, "Table Name" = False Then
DoCmd.OpenQuery "MakeTable Query Name"
End If
End Sub
Also this database is on a Terminal Services server and is accessed remotely through Terminal Services.
The main problem the client has is that they have no way of knowing if the data is correct or not.
They just happened to catch it this time on this report.
Tom