J
John Keane
Hi
I am getting the following error message in Access 2002.
Run-time error 3079
The specified field ORDER_NO could refer to more than
one table listed in the from clause of your sql statement.
when i run the following code from a button on a
form ..............
Private Sub cmdPrintRecord_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "Report2"
strCriteria = "[ORDER_NO]='" & Me![ORDER_NO] & "'"
DoCmd.OpenReport strReportName, acViewPreview, ,
strCriteria
End Sub
i have two tables "tblOrders" with ORDER_NO as Autonumber
Datatype and "tblOrderDetails" with ORDER_NO as Number
Datatype and they are linked 1 to Many.
1) How can i amend the above code to allow me to print
print one record.
2) Can i replace "acViewPreview" with something else so
that i can print the record without previewing it.
I have used the code from article id 209560 on the
Microsoft Web Site.
Many Thanks
John Keane.
I am getting the following error message in Access 2002.
Run-time error 3079
The specified field ORDER_NO could refer to more than
one table listed in the from clause of your sql statement.
when i run the following code from a button on a
form ..............
Private Sub cmdPrintRecord_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "Report2"
strCriteria = "[ORDER_NO]='" & Me![ORDER_NO] & "'"
DoCmd.OpenReport strReportName, acViewPreview, ,
strCriteria
End Sub
i have two tables "tblOrders" with ORDER_NO as Autonumber
Datatype and "tblOrderDetails" with ORDER_NO as Number
Datatype and they are linked 1 to Many.
1) How can i amend the above code to allow me to print
print one record.
2) Can i replace "acViewPreview" with something else so
that i can print the record without previewing it.
I have used the code from article id 209560 on the
Microsoft Web Site.
Many Thanks
John Keane.