Question Printing form

rockin-john

New member
Local time
Today, 14:06
Joined
Feb 18, 2011
Messages
6
Hi, I have a form made from a table called customers, also on the form are another two forms one balled appliances and the other customers orders, and two buttons one for print record and the other to email, convert to PDF and send.
when printing if a single entry for customers orders is entered it works fine, but if several entries are entered it prints the form out as many times as the entries, but i only want one copy of all entries and its the same with the email button, i cannot work out what is wrong.
Print Button: open form (where condition = "[id]="&[id])
Run menu command: Print object
Close window

hope i have explained it ok,
ty
 
Without seeing your data structure it is difficult to tell, but what does your ID field refer to ? It's rather ambiguous
 
To be honest it came from the original database which all the were on one form and i got the code from somewhere and it work fine until i split the database up, so i do not know what id relates to.
I have attached print outs of my set up if it helps.

Database layout.jpg

Main screen.jpg

order form.jpg
 
Okay - The naming on the tables really needs some sorting out but that won't be a simple process. Just as an example you have ID in you Customers table, but then have Cust_ID as the PK in the ORDER table, this is highly confusing!

You also have at least 10 other PK fields called simply ID, this makes life very difficult in the long term. Again renaming them won't be simple but they should be called a specific ID, e.g ApplianceID , ApplTypeID, etc etc.

Could you print up a picture of the query that the invoice report is based on? I'm guessing it's not linked or grouped correctly to pull in the data by page...
 
With all what Minty said you really need to sort things out:
Don't connect IDs to Strings, or are these the FK IDs but with a "string like" names ?
you don't need the Tennants Address table at all if you put the string value directly in the Customers table.
Don't put spaces in names. Not in table names, not in Field names, not in any other object in Access.
 
All IDs have been renamed and FK = foreign key (number) as suggested.
all forms & query's that were not required for the main database have been removed.
Tennants address is one line of text used for adding to the invoice showing where the job was carried out, this was requested by the customer.

I do not have a query for the invoice, i used forms invoice & Invoicesubform for the task.

New layout pic enclosed showing the renaming of the ids etc.

I am a novice at access and have and will make mistakes and thank you for your patience.

Database layout.jpg
 
Most is working now, but i want to put in a total cost box in, i can create one within the sub form which works, but it will not stay in position when printing out the invoice form, so i created one outside the sub form but it only displays the first entry and not all of them, see pic.
Thank you
 

Attachments

  • Invoice.jpg
    Invoice.jpg
    85.3 KB · Views: 85
Okay you should be able to get a sum for all of the your totals, but you want to make sure it is a running sum.

Put it in the group footer for each customer then it should be correct for each customers invoice.
 

Users who are viewing this thread

Back
Top Bottom