Go to new record on a form without adding data to the table

G

Guest

Hi Sue,
The way that my databased was behaving in the past was that it would
generate several reports (one for each record) beginning with the first
record in the table. So the user couldn't see the most recently entered data
until they navigated to the last report. So maybe the problem was just that
I needed to have Me.Dirty = False.

It sounds to me like a single report was being generated. You could
certainly force a new page, at the start of each record, so it might appear
to be several reports. But I'm willing to bet that only a single report was
being generated. In addition, if you were missing the optional WhereCondition
statement, then it would be very easy to generate a report for an entire
recordset, instead of one filtered for just the current record.
So maybe the problem was just that I needed to have Me.Dirty = False.

This will only affect whether immediated changes to data, before one
navigates off of the current record are shown in the report. Note: Using the
navigation buttons to move to a different record automatically saves any
changes to the record that you are navigating away from.
No, I don't want 1 report that includes data from all records. I want
several reports (one for each record) to display in descending order of when
the record was entered into the table when I click on the Get Report button.

Typically, this type of button would be on a switchboard form, not on a data
entry/edit form. It will be a lot more efficient to create one report, rather
than several. As I stated earlier, you can force a new page at the start of
each record, so this one report that includes many records will appear to the
casual user as if it was many reports, when in fact, it was a single report.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
I

i_takeuti

Sue said:
Wow, Tom! Thanks for the heads-up!

I will remove the code that Arvin gave me but I don't want the button on
the
form to automatically generate a report every time the user is done
entering
data on the form. I want that to be an optional thing (the user may or
may
not want a report for every record they create). So I'll try your code
without the print report part and see if it will just save the record and
get
a blank form to enter a new record.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top