Shari said:
I have a form that users input data. I want the user to be able to view a
report before updating the data to the table. Is this possible?
Yes, you simply put in a disk wirte command right before the code that
launchs the rperot.
So, go:
if me.dirty = true then
me.Dirty = false ' force write to disk of current reocrd
end if
docmd.OpenReport "myReport"
One more thing, the users are inputting data in unbound controls.
Huh...you now 100% complete lost me, and gone off on a different tangent???
If the controls are un-bound, then how is the data ever saved? When do you
save it? since un-bound controls don't save data, I not really sure of your
question now.
Perhaps you eventually run some code to save the data in the un-bound
controls? Hence, you would simply run the same code you use now to save
those un-bound controls..and then run the report.
Perhaps you asking can some un-bound controls be in the report. Sure, you
can place a text box in the report, and use the current forms textbox as a
data source for that text box in the report
eg:
=(forms!NameOfForm!NameOfTextBox)
If none of the form data actually needs to be saved, but *just* sent to the
report, then I would suggest that you actually do bind the form to one
record..as that does make reporting much more easy. You could also just bind
the report to a one record table..and never actually update that one record.
Then, your un-bound text boxes can be placed into the report as per the
above expression...
And, if your form is bound to a table with many records, and you want to
ONLY print the current record, then go:
if me.dirty = true then
me.Dirty = false ' force write to disk of current record
end if
docmd.OpenReport "myReport",acViewPreview,,"id = " & me!id