Hi All,
I just joined so please be lenient with me if my question is not worded correctly.
I have been stuck with a problem for a few days and despite best efforts at googling and trying out different methods I am still stuck.
Basically I am using Northwind Database from Microsoft as a "template" that I have modified to my requirements with the little knowledge of Access I have and the support of Google .
My problem is that when printing the invoice I need to include blank rows to fill up the report so all invoices have uniform space. I am trying union queries as well as vba on print event but nothing seems to be working.
on the union query I am able to see blank rows but not tied to the current report [order id]. So I see this (simplified)
here is the union query
select id, [Order ID], [Customer ID], [Customer Name], location_id, [Order Date], [Shipped Date], [Product ID], id, qry_sales_subform.Quantity, qry_sales_subform.Margin, [Product Name], qry_sales_subform.[Sub Total], qry_sales_subform.VAT, qry_sales_subform.Total, qry_sales_subform.[Unit Price],Price, phone, Place, tin
from [invoice data]
UNION ALL
SELECT [id],null,null,null,null,null,null,null,null,null,null ,null,null,null,null,null,null,null,null,null
FROM [invoice blank data]
WHERE ([id] Between
((((SELECT Count(*)
FROM [invoice data]) - 1) Mod 15) + 2) And 15)
Exp1000 | Order ID | Other fields
117 | 730 | *
117 | 731 | *
91 | 731 | *
89 | 731 | *
8 | [blank] | *
9 | [blank] | *
10 | [blank] | *
what i need in this case (to fix the union query) is so that all extra added rows need to have the order ID currently used in the report which is filtered through the order details form after clicking on create invoice.
Can someone help me on this either fixing the union query or another strategy to include the blank rows based on current data.
Another thing about this is that my page is in landscape mode and is going to be printed twice on one a4 portrait sheet (customer invoice) (company invoice)