Copy current record to report form


S

Stockwell43

Hello,

I created a form in access 2003. I copied the fields and placed them in the
report detail section. Now in design view of the report, the checkboxes are
checked but when I flip it in regular view the boxes are emptied (currently I
have the table of being the record source).

What I want to accomplish is this:

When the user fills out the form, they click add record to save it and it is
stored, easy enough. I want to be able to pull up the form in the report that
I created and click a button and have the fields from the current record fill
in the fields on the report just in case management wants a printed copy.

I am doing this because we need this form in order to make changes and
create new items and instead of keeping them in a folder and have more paper
around, the user can just send me and email from the database saying they
entered a request and then I would go in and view it. This way, they are all
stored in the database with no paper or folders. However, as mentioned above
if the manager wants a printed copy, I need a way to print it. If this can be
done, any help would be greatly appreciated.

Thank you to all!!!!
 
Ad

Advertisements

A

Arvin Meyer [MVP]

To print the current record, you can create a button and add code like:

Sub cmdPrintMe_Click()
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "YourReportName",,,"IDField=" & Me.txtIDField
End Sub

where cmdPrintMe is the name of your button, IDField is the primary Key in
the underlying table, and txtIDField is the name of the textbox on your form
which displays the prmary key field.
 
Ad

Advertisements

S

Stockwell43

Hi Arvin!

Thank you for your reply.

Works like a charm and was easier than I thought. Thank you for also going
so far as to explain what each field represented, took the guess work out.

Thank you again and as always your help is much appreciated!!!
 

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