I am trying to put a value into a variable from an sql statement, and I am getting an error...here is my code which is way wrong:
The results of the query will always be one result, so no where clause is necessary. However, the error I get is:
The report named "SELECT PackSlip FROM InvoicePackSlipPrint" you entered is mispelled or blah blah...
Can someone point me into the right direction? Also, instead of having it view the report, could I have it print it instead?
Code:
Function PrintPackSlip()
Dim strPackSlip As String
strPackSlip = "SELECT PackSlip FROM InvoicePackSlipPrint"
DoCmd.OpenReport strPackSlip, acViewNormal
End Function
The results of the query will always be one result, so no where clause is necessary. However, the error I get is:
The report named "SELECT PackSlip FROM InvoicePackSlipPrint" you entered is mispelled or blah blah...
Can someone point me into the right direction? Also, instead of having it view the report, could I have it print it instead?