Create a report from a form

D

Dee

I want to create a database for tracking sample requests.
We have a huge inventory of blood samples where scientists
requests particular samples to run tests. I would like to
create a form for them to complete in Access and then
print out as a hard copy of the sample request. How would
I create a report to print out the information on just the
form they completed. For instance, they would go into the
Access form and complete the form then print the form as a
report to hand out as a hard copy for signature. I am
using Access 2000. Is it possible to create a report from
just the record of the form you complete?

Thanks in advance for your help.

Regards,

Dee
 
A

Alan Fisher

-----Original Message-----
I want to create a database for tracking sample requests.
We have a huge inventory of blood samples where scientists
requests particular samples to run tests. I would like to
create a form for them to complete in Access and then
print out as a hard copy of the sample request. How would
I create a report to print out the information on just the
form they completed. For instance, they would go into the
Access form and complete the form then print the form as a
report to hand out as a hard copy for signature. I am
using Access 2000. Is it possible to create a report from
just the record of the form you complete?

Thanks in advance for your help.

Regards,

Dee
.
Yes, make a report based on the same query you used for
the form. You need to have a Primary Key for each record
such as an Autonumber. Make sure the Primary Key field is
included in the query even if you don't use it as a text
box. Then create a button that opens the report using the
primary key as the Where criteria. The button would be on
the same form that the doctor inputs the data. The On
Click code for the button that opens the report would then
look like this:


DoCmd.OpenReport "YourReportName",
acPreview, ,"[PrimaryKeyFieldName]= "
me.[PrimaryKeyFieldName]


(all the above would need to be on on line. This dialog
box makes it look like three lines)

This will open the report for the unique record the doctor
is on because of the Primary key.
 
D

Dee

Alan,
Thank you for your response. I followed your instructions
but I still have a little problem. When I click on the
command button the report opens with the labels but no
fields. The only thing I couldn't understand was when you
said to create the button that opens the report using the
primary key as the Where criteria. I created the command
button using the wizard. How would you create the button
using the primary key as the Where criteria. The only
option I had when using the wizard was report operations,
it asked me what report I wanted to open, it didnt' give
me an option to use a field as my Where criteria.

Thank you so much for your help.

Best regards,

Dee
-----Original Message-----
-----Original Message-----
I want to create a database for tracking sample requests.
We have a huge inventory of blood samples where scientists
requests particular samples to run tests. I would like to
create a form for them to complete in Access and then
print out as a hard copy of the sample request. How would
I create a report to print out the information on just the
form they completed. For instance, they would go into the
Access form and complete the form then print the form as a
report to hand out as a hard copy for signature. I am
using Access 2000. Is it possible to create a report from
just the record of the form you complete?

Thanks in advance for your help.

Regards,

Dee
.
Yes, make a report based on the same query you used for
the form. You need to have a Primary Key for each record
such as an Autonumber. Make sure the Primary Key field is
included in the query even if you don't use it as a text
box. Then create a button that opens the report using the
primary key as the Where criteria. The button would be on
the same form that the doctor inputs the data. The On
Click code for the button that opens the report would then
look like this:


DoCmd.OpenReport "YourReportName",
acPreview, ,"[PrimaryKeyFieldName]= "
me.[PrimaryKeyFieldName]


(all the above would need to be on on line. This dialog
box makes it look like three lines)

This will open the report for the unique record the doctor
is on because of the Primary key.
.
 

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