troubles updating records

rdeanh

New member
Local time
Today, 03:12
Joined
Aug 10, 2002
Messages
8
I have a form that stores memos and a button that tells it to preview a report of the memo. The problem is that if I change anything after previewing it, I have to exit the form and go back in to get the report preview to show what I just added. I also have a similar problem when I try to add a new product from a pop-up that appears on my orders from when a product is not in the products table. When I enter the product into the product table from the pop-up and return to the orders form, it still shows that the product is not available unless I exit Orders and go back in. I have had very bad luck with the requery command in both macros and code. I am doing something wrong but I can't figure out what. If anyone has any insight, it would be greatly appreciated.

Rocky H
 
You need to force Access to save the record before you preview the report. To do that, add the following line of code just in front of the OpenReport Method:

DoCmd.RunCommand acCmdSaveRecord

Normally records are not saved until you move to a new record either by scrolling forward or back or by closing the form. The report is displaying data from the table NOT from the form. If the record on the form has not been saved, the report cannot see it.
 

Users who are viewing this thread

Back
Top Bottom