Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

3 forms, 1 table - I want a simple print

Status
Not open for further replies.

AidanEnos

MIS
Dec 11, 2000
189
Ok, I have 1 large table... far too many fields to fit on a single page... so I made 3 pages.

Each of the forms prints on it's own page call them A, B and C

I want my main database page to have a button, that when clicked runs a query [Enter record number], that in turn opens each of the 3 forms - filters for that record number and prints them (bringing up the print window is better than using the default printer settings if possible)

Thanks again :)

 
Hi--what have you tried already? Do you have your form set up to capture the RecordNumber in a text box? When you day "Database page" do you mean a "form"? What is the recordsource of your forms? It could just be as simple as putting Forms!MainForm!txtRecordNumber as a criteria, right?

Also, when you say you have a table with too many fields to fit on a single "page" (which i assume you mean "form") I wonder if maybe your db structure could use a tune up?

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
<i>Hi--what have you tried already?</i>
Well what I have tried hasn't worked, so a complete list of my failures isn't really important ;)

<i>Do you have your form set up to capture the RecordNumber in a text box?</i>
Yes I do, cleverly named "Order Number"

<i>When you say "Database page" do you mean a "form"?</i>
Correct, I have created a form that is a "launchpad" so that I have buttons for users to do things like search for a print a record (this question), input a new order, they will also run some reports and Invoicing from the same "launchpad" Form page .


<i>What is the recordsource of your forms?</i>
The recordsource is a simply a Table.

<i>It could just be as simple as putting Forms!MainForm!txtRecordNumber as a criteria, right?</i>
Not sure, hence the question ;) What Syntax would I use for multiple forms (A, B and C)

<i>Also, when you say you have a table with too many fields to fit on a single "page" (which i assume you mean "form")</i>
Well, yes and no - on a single printed page, so instead of making one form with multiple pages... which I can resort to if necessary, I have made the multiple pages as different forms - one for basic Customer and contact info, one for order details andone for additional information relating to the delivery, etc..

<i>I wonder if maybe your db structure could use a tune up?</i>
That could always be true as well, this is a new database I am creating - the underlying table isn't THAT big - just too much for a single page form to print.
 
So what is the code behind your "button"? I'm just trying to help out here, that's why I ask for info from you.

Why not have

Dim strWHERE as string
strWHERE = "ItemID = " & me.txtOrderNumber


Docmd.Openform "FormName1",,,strWhere
Docmd.Openform "FormName2",,,strWhere
Docmd.Openform "FormName3",,,strWhere

Or in the recordsource of your forms, you can reference

Forms!FormName!txtOrderNumber in lieu of your [Prompt].

Also I suggest not having spaces in your control names ("Order Number") cause it can cause problems later.


Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
There is no code behind the button - I said I want a button to do all that not that I have one doing that :)

And are you suggesting I rename all of the fields in my table to remove the spaces? I can do it - if it's justifiably important
 
You said "I have created a form that is a 'launchpad' so that I have buttons for users to do things" so I assumed that meant you "have a button".

Create a new button. Put code in the OnClick event.

You don't "HAVE" to remove your spaces. I have just found in my 10 years of using MS Access that I can go in circles for hours with an error, and it's due to something little and dumb like not referencing a control properly because it had a space in it. You can do whatever you want.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top