Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Report values do not change

Status
Not open for further replies.

dburnham

Programmer
Oct 18, 2001
118
0
0
US
I have created a Data Report that pulls information directly from an Access Table. What I have done is queried several table and updated an additional table. I then .Show the report to print. After "X" cancelling the report I will Query different data, i.e. user ID, and the .SHOW the report again, however, the original data is still on the report.

How do I update the information on a data report.

I have tried closing and reopening the connection but nothing good comes from that.

I can provide the code if necessary.
 
I have not used the Data Report or ADO at all, but I suspect that there is a "Refresh" method that should do the trick. If not, hopefully somebody who uses ADO will be able to help you.

Hunter
 
There is a Refresh, however, it seems that the refresh does not change the data on the form. To update the Data I have to close the application and re-run the report.

Thanks for your help,

David
 
Are you closing the recordset/connection then re-opening them? This is the code I used for a project, it might help.

If deFile.rscomDetailedTasks_Grouping.State = adStateOpen then
deFile.rscomDetailedTasks_Grouping.Close
End If
deFile.rscomDetailedTasks_Grouping.Open
deFile.rscomDetailedTasks_Grouping.Requery
deFile.Commands("comDetailedTasks_Grouping").Execute

drDetailedTask.Show vbModal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top