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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with forms please...

Status
Not open for further replies.

vince99

IS-IT--Management
Mar 1, 2001
63
US
Hello,

I have created a form on which users can enter a variety of data. The Form consists of 5 different pages. I need help on printing the form. What I want to do is have a print button on each form that will print out the current form being displayed (Maybe I can select which data I want printed or something) and another button that will print out the entire 5 pages that belong to that record and thats it...

Any help is greatly appreciated.... Thanks....
 

You need to create two buttons on your form. Open the properties for the button. Under the events tab click on "OnClick". Create a macro. Use the PrintOut Action. Specify if you want all or just a certain page printed in the fields shown under the macro list. Select all for Print All button or select Pages for single page button and specify the page range.

Hope this helps

Chris
 
Ok, I have done what you said but when it prints i get a blank page and Ideas?

 
Check the print preview before you print the form and see if the blank pages are in the print preview. If so, you need to reduce the size of the form in Design View or in Page setup reduce the margins.

Form width + left margin + right margin < 8.5&quot;
Form Height + top margin + bottom margin < 11&quot;

Blank Page usually come out because of forms being too large.

Do you have all 5 pages on one form? Or seperate froms for each page?

Chris
 
all 5 pages make up one form...

I used tabs to separate each form.....


 

How much space does the pages take up. Could you give me the width and height of each page and total width across and down for all pages combined

Chris
 
I have figured out what my problem is...

The form is too long, but when I try to make it smaller in design view, it wont let me go smaller that 15.7 for the height...

so when I print the selected form, I get 4 pages even if I select only to print the page that I want....

any ideas?

 

You need to reduce the size of the fields or if there is a picture or textboxes, you need to make them smaller.

Is the height of the 5 pages combined 15.7

Chris
 
Ok I figured out how to get it all on one oage, but the problem I am having now is that some of the text fields that i fill in on the form are not printing...

for example, I have a text box for

frist name: ............

only first name prints and nothing else to the right of it

any ideas
 
I know what is happening!!!!!

Access is looking at the first record, but I am on the 110
record... how do I make it so when I select print preview it will go to the current page ?

 

I had the same kind of problem. In form view can you see what's in the Field. If you can't, try turning off the filters/sort in one of the menus I forget which one but it's called Remove Filter/Sort.

Also, your record source must contain all the fields on the form.

If you have criteria specified in a query for the form this may cause the problem.

Also, make sure you have the correct relationships specified in the relationship window.

Hope this Helps
 
I have a better Idea...

is there a way to run a query based on the record currently being displayed?

If so, I can reun a query, select only the fields i want, and then print it.....

but I dont know how to run a query based on the open record and make it return only that record... and thoughts?
 

When I create forms I keep this in mind:

1. Have a table with all field that pertain to the form you are creating

2. Make a query based on the table

3. When creating form use the query as the record source. Then open Field List and Drag and drop fields.

4. Make sure you specify relationships between tables if there are multiple tables. Using a unique field which is the same through all tables.


Another way is to create a report based on the query.


 
I can create a report based on the query, but is there a way that when you run the query only the record that you are looking at is passed to the report?
 
use your button click event on the form to filter your table and print only what you require. Code like the following:

Code:
Dim strReportName as String
dim strYourCriteria as String

strYourCriteria = &quot;[YourFieldName] =
 Forms!YourFormName!YourFieldName]&quot;
DoCmd.OpenReport strReportName, acViewPreview, strYourCriteria


This will open your report and display only those records that match your criteria field value currently displayed on the form.

HTH

Lightning
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top