I am trying to print a picking ticket from data entered by an order taker. The data is stored in a database table using Access 2000, ADO, and VB 6.0 SP 4. I am able to view the data with Access and it looks correct. The table only contains the information for the order for which I wish to print a picking ticket.
The VB code to print the report is as follows:
strOrdNo = CStr(lngOrdNo)
strRecSelect = "{PikTik.PTOrderNo}= " & lngOrdNo & ""
PickTicket.DataFiles(0) = App.Path & "SalesInvent.mdb"
PickTicket.SelectionFormula = ""
PickTicket.SelectionFormula = strRecSelect
PickTicket.Action = 1
I have tried both Action = 1 and PrintReport. PrintReport does nothing - output either preview or print. Action =1 yields runtime error 20500; not enough memory for operation.
The report was created in CR8 with data bound to the Access table and the preview looks correct. Therefore I assume that I am missing something on the VB side to activate the report correctly.
Any help is greatly appreciated.
[sig][/sig]
The VB code to print the report is as follows:
strOrdNo = CStr(lngOrdNo)
strRecSelect = "{PikTik.PTOrderNo}= " & lngOrdNo & ""
PickTicket.DataFiles(0) = App.Path & "SalesInvent.mdb"
PickTicket.SelectionFormula = ""
PickTicket.SelectionFormula = strRecSelect
PickTicket.Action = 1
I have tried both Action = 1 and PrintReport. PrintReport does nothing - output either preview or print. Action =1 yields runtime error 20500; not enough memory for operation.
The report was created in CR8 with data bound to the Access table and the preview looks correct. Therefore I assume that I am missing something on the VB side to activate the report correctly.
Any help is greatly appreciated.
[sig][/sig]