M
Marisa
Hi,
I have FormA which triggers ReportA via the following syntax:
Dim stDocName As String
Dim strSQL As String
stDocName = "Orders"
strSQL = "[OrderID] =" & Me![OrderID]
DoCmd.OpenReport stDocName, acViewPreview, WhereCondition:=strSQL
The command works only under the following conditions:
Where FormA is linked to tblA and ReportA is linked to tblA
or
where FormA is linked to viewA (qryA) and ReportA is linked to viewA
However, I need the above syntax work with the following conditions:
Where FormA is linked to tblA and ReportA is linked to viewA.
Which is, in my opinion, how it should be done.
Can someone pls direct me to a sound solution.
Thank you.
ACCXP -> SQL2k
I have FormA which triggers ReportA via the following syntax:
Dim stDocName As String
Dim strSQL As String
stDocName = "Orders"
strSQL = "[OrderID] =" & Me![OrderID]
DoCmd.OpenReport stDocName, acViewPreview, WhereCondition:=strSQL
The command works only under the following conditions:
Where FormA is linked to tblA and ReportA is linked to tblA
or
where FormA is linked to viewA (qryA) and ReportA is linked to viewA
However, I need the above syntax work with the following conditions:
Where FormA is linked to tblA and ReportA is linked to viewA.
Which is, in my opinion, how it should be done.
Can someone pls direct me to a sound solution.
Thank you.
ACCXP -> SQL2k