Purchase Order NOT previewing on report properly (1 Viewer)

jordanturner

New member
Local time
Today, 18:09
Joined
Oct 6, 2010
Messages
2
Hello,

I am having real problems understanding why my purchase order form will not preview as a report. Well the form will preview on the report but only after certain fields have been entered.n The form has all the normal fields a PO would have. It has a sub table for different order lines. In the sub table the fields are :

transactionID, transactionTypeID, unitPrice, quantityOrdered, quantityReceived,
dateReceived, receivedBy.

The purchase order will not preview the order onto the report until the last field- receivedBy(combobox) is entered. The problem with that is when ordering, the company will only initially fill out the ordering fields until the order arrives as a delivery, then they will come back to the form and fill out the received fields.

The receivedBy field is a combo box that will show different employee names and looks like this:

SELECT [tblEmployees].[EmployeeID], [tblEmployees].[Forename], [tblEmployees].[Surname] FROM tblEmployees;


The SQL for the report that previews the order looks like this:


SELECT tblPurchaseOrder.*, tblInventoryTransactions.QuantityOrdered, tblInventoryTransactions.UnitPrice, tblStock.ItemName, Nz([tblInventoryTransactions].UnitPrice)*Nz([QuantityOrdered]) AS Subtotal, tblSupplier.CompanyName, tblEmployees.EmployeeID, tblEmployees.Forename, tblEmployees.Surname
FROM tblSupplier INNER JOIN (tblStock INNER JOIN (tblPurchaseOrder INNER JOIN (tblEmployees INNER JOIN tblInventoryTransactions ON tblEmployees.EmployeeID = tblInventoryTransactions.EmployeeID) ON tblPurchaseOrder.PurchaseOrderID = tblInventoryTransactions.PurchasesOrderID) ON tblStock.StockID = tblInventoryTransactions.StockID) ON tblSupplier.SupplierID = tblPurchaseOrder.SupplierID;


Any ideas for help on this will be greatly appreciated and I am sure it is something really small and simple but has been annoying me for a couple of days now.

Thank you
 

PNGBill

Win10 Office Pro 2016
Local time
Tomorrow, 05:09
Joined
Jul 15, 2008
Messages
2,271
I may be on the wrong track here but why would you want to Preview a Form?

Often you would Preview the Same Data that is showing on a Form but you would click a command button that would open a Report and this report would have it's own sql/query to provide it with it's own Data Source.

The Command Button would have code to set a Link Criteria so you would have the same data displayed but in reality it is a completely separate Object with it's own Data Source.

Essentially what I am thinking is that you create a sql/query to return the data you require and this is the Report Data Source.
You will then have no problem with the field causing an issue now as this will be resolved as you build the sql/query.
 

Users who are viewing this thread

Top Bottom