Create form as report in access

S

Stockwell43

Hello,

A manger approached me with a question about doing a form in access so when
they enter their information, it will print on a form instead of them having
to fill it out by hand. I have heard of this in access 2007 but not 2003
which is what I am using. Is this a possibility?

I am not looking for a mail merge. I will have a form set up as a regular
database to enter daily data but when they need to fill out a particular
form, they want to use the information they typed in that record to print the
form.

Any help and or suggestions would be great!!!

Thanks!!
 
J

joecosmides

Hello,

A manger approached me with a question about doing a form in access so when
they enter their information, it will print on a form instead of them having
to fill it out by hand. I have heard of this in access 2007 but not 2003
which is what I am using. Is this a possibility?

I am not looking for a mail merge. I will have a form set up as a regular
database to enter daily data but when they need to fill out a particular
form, they want to use the information they typed in that record to printthe
form.

Any help and or suggestions would be great!!!

Thanks!!

I may need a little more information but as an exampple would this be
the same type of thing?:

Let's say there are 5 employees and their information is stored in a
table in Access called EmployeeT. In it are the following fields:
FirstName, LastName, HomePhone, HomeAddress, City, State, Zip.

When they fill out an order form (a different form) for a customer you
need to know which employee sold the order. So rather than have the
eomplyees constantly write their name, address, phone, etc into the
sales order you want to be able to use a drop-down and just select
which employee and as soon as you click the employee in the drop down
it fills out the few fields on that order page automatically filling
in the Name, Address, Phone, city, state, etc of the employee.

This is just an example. Is this what you're trying to do?
 
S

Stockwell43

Hi Joe,

Not quite. We process loans so when the user inputs the loan information in
the database, they will need to fill out a form based on the information that
was inputted. What I want is to create a form in the report section so that
when a button is clicked on the input form, the information from that record
will transfer on the form created in the report section linked by the record
ID.

So another way to put would be instead of doing a mail merge document, when
I finished entering the data in the access form and click the merge button
instead of transferring the information into a word document, it will
transfer to the document in the report detail section of the database so
everything is housed inside the database. Basically, taking the mail merge
word document and placing it in the report detail section of the database and
print it from the database.

Am I making sense? I know what I want but may not be explaining it write.
 
A

Albert D. Kallal

So, you asking how can you print the current record to a report?

(so much more simple when you keep the question simple!).

Assuming you built a report with the correct layout of the fields you need,
then the code behind a button your form to print the one record is:

me.Refresh
docmd.OpenReport "nameOfReport",,,"id = " & me!id

Some people actually try to print the form, but it tends to be quite a messy
affair, so it best to build your report based on the same table as the form,
and use the above code to print that ONE record.

You have to replace the "id" in the above with the actual autonumber
(primary key) that you used (most people use the default "ID", but you have
to change "id" in the above to whatever name you used for this field.
 
S

Stockwell43

Hi Albert,

I know, sometimes I give too much info. Just want to make sure I cover as
much as possible so there might be less questions. :blush:)

You code worked fine and thank you!

One question:

When I open the report it shows all the records like in a continuous file.
Is there a way for the report to show only one record at a time? So if there
are 50 records in the form and then I open the report I can click on the
record selctor at the bottom to scroll through the fifty records? I have the
table as my record source for the report.

Thanks!!
 
A

Albert D. Kallal

When I open the report it shows all the records like in a continuous file.
Is there a way for the report to show only one record at a time? So if
there
are 50 records in the form and then I open the report I can click on the
record selctor at the bottom to scroll through the fifty records? I have
the
table as my record source for the report.

You can layout the report to only print one record per page. when you open
the report in design mode, you see the detail section like:



<textbox1> <textbox2> etc. etc. etc. etc.

In the above, you see that the text boxes are "beside each" other. You can
expand the detail section,a nd then re-arrange the layout to

<textbox1> <textbox5>
<textbox2> <textbox6>
etc.
etc.
etc.
etc.

So, you can layout the text boxes like a form.

Once you done the above, you also need to have the report start a new page
for EACH record. You can do that by clicking one "blank" area of the
reports detail section (while in design mode), and then view the property
sheet.

You see an option on the format tab called
Force new page.

You can set the above to "after section" and thus a new page will be forced
for each record...
 
S

Stockwell43

Hi Albert,

That worked out great, thank you so much for that tid bit!!! I didn't know
but I saved it with the rest of my tid bits and code for next time.

Thank you again!!!
 

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