Underlying table not updating

Peter Bellamy

Registered User.
Local time
Today, 01:30
Joined
Dec 3, 2005
Messages
295
I don't think I have ever had this before, it has me scratching my head!

I have a form which enters the data for an underlying table. Each form represents a record of the table.
There is a button on the form to print the current record by using a query.
Simple.

The problem is that the data on the form does not appear on the print unless you move to another record and then back again. So it seems the table is not getting updated as the user moves from field to field.

Should it be necessary to force an update?

Cheers
pnb
 
Save the record before print - As the record will not exist to print until Saved.

Add the 'Save' macro before Print in the event details.
 
Thanks, but.....

The form is based on a query on the table and the report is based on the same query with a filter for that record.
The query should return up to date data ???

I have not had the problem before using the same methods

pnb
 
I have tried saving the form but it has made no difference
DoCmd.Save acForm, "Form Name"

???
pnb
 
Need to save the record, not the form. Just create the default "save" button as available via the wizard and you should be able to find the code your looking for.
 
Thanks.
That brings up an error that 'Save record is not available now'
:mad::mad:

pnb
 
Is the query that the form is based on updatable? You can test this by running the query by itself and check the navigation buttons on the bottom. If the last button is greyed out, then the query is not an updateable one.
 
Yes it is updateable.
Stepping to the next record and back again enables the report to print correctly.
As I said in an earlier post the report is based on the on the same query as the form, but withe a filter to selectthe current record.

pnb
 
Solved it.
Access does not like the Visula Basic window open when it does the :
RunCommand acCmdSaveRecord action.

Close that and it works as it should.
Thanks everyone !

pnb
 

Users who are viewing this thread

Back
Top Bottom