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!

Report not updated after form save

Status
Not open for further replies.

Emblem1

Technical User
Jan 11, 2007
77
US
I have a form that has a button to display a report based on the current record in the form. Works great until you change data in the form and then save. Then using the report button still shows the old info. You have to close and reopen the form to the record before the report shows the updated information.

The record is chosen by a combo box.

The code I have to show the report is:

Dim stDocName As String

stDocName = "Wattage Report with data"
DoCmd.OpenReport stDocName, acPreview, , "[Intersection Number]=" & Forms![Easy Wattage Update Form]![Intersection Number]


Or do I need to add something to the Save Button Click Sub?
 
Requery the Form first.
Forms!FormName.Requery

or

Me.Requery 'if the form has the focus

Either should do the trick.

Paul
 
That worked. Still new at this.

Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top