Update Form / Report

billythedj66

Board Regular
Joined
Jan 6, 2003
Messages
126
I have a Button (Print Report) on a Form (220 Form) that opens a specific record of a Report (220 Form - Payment 1) then prints the report, the problem I have is that if I enter or edit any of the fields on the Form, the changes aren't seen on the report, what am I missing, here's my code:


Private Sub Print Report_Click()

DoCmd.Save
DoCmd.OpenReport "220 Form - Payment 1", acViewNormal, , "[JobID]=[Forms]![220 Form]![JobID]"
DoCmd.Close acReport, "220 Form - Payment 1"


End Sub

PS: Happy Holidays!!!
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Are the form/report based on the same query/table?

Try Me.Requery in your code to update the underlying source for the form.
 
Upvote 0
Yes, both the Report and Form are from the same Table. I am trying to avoid going to next record, then previous record, before printing the report.
 
Upvote 0
Billy

Have you tried Me.Requery? It would go right at the start of the code you posted.
 
Upvote 0

Forum statistics

Threads
1,221,834
Messages
6,162,268
Members
451,758
Latest member
lmcquade91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top