Update

  • Thread starter Thread starter Derek
  • Start date Start date
D

Derek

Hi
Sorry to put another string in the newsgroup about this
problem but I need urgent help.

I have a main form and a subform. I programmatically enter
information into the subform. When I try to print a record
I get an error and no data. The print command button is on
the subform. No matter how many times I refresh the record
the data will not show. I have to close the report and
reopen it to be able to print the record. So clearly
refresh does not write the record to the database. Someone
mentioned to try

Me.Dirty = False.

Even that doesn't work. Can I not forse the record to save
with Update or is there a save command?

Any Ideas? Help!!
 
try

DoCmd.RunCommand acCmdSaveRecord

on the Print command button, before the OpenReport action.

hth
 
Thanks Tina

Unfortunateley that does not work either.

If it helps the problem also happens when you enter a new
record into any form and try to print that record
immediately. I cannot be the only person in the world to
get this problem. What am I doing wrong. I've been working
with Access for 6 years never solved the problem and never
seen it on a newsgroup. Help!!
 
well, you always have to save a new record (or updates to an existing
record) before printing, because the report is pulling data from the table,
not from the form. if you're saving the data to the table but still can't
pull it in a report - that sounds very strange to me.
if your db is in A97 or newer, you can compact, zip and email to me if you
like, and i'll take a look at it. if you want to do that, post your email
address here (beware the spammers, of course) and i'll send you my email
address.
 
Back
Top