How to setup forms, queries, and/or reports to print only one specified record

R

Robert Paisley

Hello all,

I've been trying to setup my database to print Job Orders and Invoices based
on one Job Order Number (data in text).

****************************************************************************
*
The tables and associated forms in question are:

Table1 = Purchase Orders

All purchase order information. The Purchase Orders table is using
PurchOrderNo as the primary key (data is in "text"). The table also has a
CustomerID field to setup the "many-to-one" relationship to the Customer
table.

Table2 = Customer

All customer information. The table has a CustomerID (AutoNumber) as the
primary key.

****************************************************************************
*

I've designed very simple forms for data input and, I've set up a query to
combine the two tables. Now, I'm scratching my head trying to figure out
how to print a report for a specific PurchOrderNo.

I'm missing something...somewhere...maybe between my ears...because this
seems like it should be such a simple step in the process. I've even tried
some of the Access 2000 templates and tried to modify them. But, I end up
corrupting the database.

HELP!!!

Any help that gets me "into the light" is greatly appreciated.

Thanks,

Bob
(e-mail address removed)
 
T

tom

Simply, when you open a report make sure the 'order no' field in it's
recordsource refers to the 'order no' visible on your open form ... e.g. set
its criteria field Forms![MyForm]![OrderNo]

HTH.

Tom.
 
P

PC Datasheet

Robert,

If your form is a single form where you display one record at a time, add a
button and put this code in the OnClick event:

DoCmd.OpenReport "YourReportName",,,"[PONumber] = " &
Forms!NameOfYourForm!NameOfPONumberTextbox

If your form is a continuous form displaying multiple PONumbers, put the above
code in the OnClick event of the PONumber textbox.
 
T

Tom

Thanks, for the advice. I put the criteria you suggested
into my query...in the criteria field of the
PurchaseOrderNo column.

Forms![Purchase Orders]![PurchaseOrderNo]

When I open the report, it shows the following input
screen:

Enter Parameter Value
Forms!Purchase Or

I've changed captions in tables and forms to read:

Enter Purchase Order Number

But, it doesn't change the input screen. Color
me "computer challenged"...

What can I do?

Bob
 
G

Guest

Thanks,

I'll give it a try and let you know what happens.

Bob
-----Original Message-----
Robert,

If your form is a single form where you display one record at a time, add a
button and put this code in the OnClick event:

DoCmd.OpenReport "YourReportName",,,"[PONumber] = " &
Forms!NameOfYourForm!NameOfPONumberTextbox

If your form is a continuous form displaying multiple PONumbers, put the above
code in the OnClick event of the PONumber textbox.


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
www.pcdatasheet.com


Robert Paisley said:
Hello all,

I've been trying to setup my database to print Job Orders and Invoices based
on one Job Order Number (data in text).
***********************************************************
*****************
*
The tables and associated forms in question are:

Table1 = Purchase Orders

All purchase order information. The Purchase Orders table is using
PurchOrderNo as the primary key (data is in "text"). The table also has a
CustomerID field to setup the "many-to-one" relationship to the Customer
table.

Table2 = Customer

All customer information. The table has a CustomerID (AutoNumber) as the
primary key.
***********************************************************
*****************
*

I've designed very simple forms for data input and, I've set up a query to
combine the two tables. Now, I'm scratching my head trying to figure out
how to print a report for a specific PurchOrderNo.

I'm missing something...somewhere...maybe between my ears...because this
seems like it should be such a simple step in the process. I've even tried
some of the Access 2000 templates and tried to modify them. But, I end up
corrupting the database.

HELP!!!

Any help that gets me "into the light" is greatly appreciated.

Thanks,

Bob
(e-mail address removed)


.
 
B

Bob

Thanks, for the advice. I put the criteria you suggested
into my query...in the criteria field of the
PurchaseOrderNo column.

Forms![Purchase Orders]![PurchaseOrderNo]

When I open the report, it shows the following input
screen:

Enter Parameter Value
Forms!Purchase Or

I've changed captions in tables and forms to read:

Enter Purchase Order Number

But, it doesn't change the input screen. Color
me "computer challenged"...

What can I do?

Bob
bpaisley(removethis)@bellsouth.net
 

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