G
Guest
In an Access Database Project, Im having trouble getting a View to query data
based off of a value from a form. My ultimate goal is to run a report off of
this View. For example if Form1 FieldLocation = 256, I want the View to find
all items in Location 256. Below is the View I want to use for this(I
understand that some of the field names with # is not the best way to name a
field).
SELECT dbo.tbl_HoldOrderDetails_View.ITEM#,
dbo.tbl_HoldOrderDetails_View.[DESC], dbo.tbl_HoldOrderDetails_View.[CASE],
dbo.tbl_HoldOrderDetails_View.BTL,
dbo.tbl_HoldOrderDetails_View.LOCATION, dbo.tblInvCount.CurLoc,
dbo.tblInvCount.BoxId,
dbo.tbl_HoldOrderDetails_View.LINE#,
dbo.tbl_HoldOrderDetails_View.[P/UP] AS PU,
dbo.tbl_HoldOrderDetails_View.[P/ASIDE] AS PA,
dbo.tbl_HoldOrderHeader.ORDER#,
dbo.tbl_HoldOrderHeader.CustomerCode,
MSData.dbo.tblCUCustomer.CustomerLastName,
MSData.dbo.tblCUCustomer.CustomerFirstName
FROM dbo.tblInvCount LEFT OUTER JOIN
dbo.tbl_HoldOrderDetails_View ON dbo.tblInvCount.BoxId
= dbo.tbl_HoldOrderDetails_View.LINE# LEFT OUTER JOIN
MSData.dbo.tblCUCustomer RIGHT OUTER JOIN
dbo.tbl_HoldOrderHeader ON
MSData.dbo.tblCUCustomer.CustomerCode = dbo.tbl_HoldOrderHeader.CustomerCode
ON
dbo.tbl_HoldOrderDetails_View.ORDER# =
dbo.tbl_HoldOrderHeader.ORDER#
Is this something that needs to be done with VBA?
based off of a value from a form. My ultimate goal is to run a report off of
this View. For example if Form1 FieldLocation = 256, I want the View to find
all items in Location 256. Below is the View I want to use for this(I
understand that some of the field names with # is not the best way to name a
field).
SELECT dbo.tbl_HoldOrderDetails_View.ITEM#,
dbo.tbl_HoldOrderDetails_View.[DESC], dbo.tbl_HoldOrderDetails_View.[CASE],
dbo.tbl_HoldOrderDetails_View.BTL,
dbo.tbl_HoldOrderDetails_View.LOCATION, dbo.tblInvCount.CurLoc,
dbo.tblInvCount.BoxId,
dbo.tbl_HoldOrderDetails_View.LINE#,
dbo.tbl_HoldOrderDetails_View.[P/UP] AS PU,
dbo.tbl_HoldOrderDetails_View.[P/ASIDE] AS PA,
dbo.tbl_HoldOrderHeader.ORDER#,
dbo.tbl_HoldOrderHeader.CustomerCode,
MSData.dbo.tblCUCustomer.CustomerLastName,
MSData.dbo.tblCUCustomer.CustomerFirstName
FROM dbo.tblInvCount LEFT OUTER JOIN
dbo.tbl_HoldOrderDetails_View ON dbo.tblInvCount.BoxId
= dbo.tbl_HoldOrderDetails_View.LINE# LEFT OUTER JOIN
MSData.dbo.tblCUCustomer RIGHT OUTER JOIN
dbo.tbl_HoldOrderHeader ON
MSData.dbo.tblCUCustomer.CustomerCode = dbo.tbl_HoldOrderHeader.CustomerCode
ON
dbo.tbl_HoldOrderDetails_View.ORDER# =
dbo.tbl_HoldOrderHeader.ORDER#
Is this something that needs to be done with VBA?