In my present situation, I need to print the contents of a access 2000 table out to a receipt printer using vb6. The table is already layed out with everything aligned properly.
Anyone have any ideas on how to accomplish this?:confused:
Printable View
In my present situation, I need to print the contents of a access 2000 table out to a receipt printer using vb6. The table is already layed out with everything aligned properly.
Anyone have any ideas on how to accomplish this?:confused:
receipt printer ?
Yes a receipt printer. This will be printed automatically upon completion of the transaction (purchase). I do not want to see a print preview, just print the receipt.
use vb print function? is that an option ?
VB Code:
Private Sub Command1_Click() Dim p As Printer p.Print "blabla" p.Print "some more blabla" p.EndDoc End Sub
You mean something like "Printer.print"? When I try this in access I come up with an error that reads "Variable not Defined".
did u try declaring a var as printer (see above sample) ?Quote:
Originally posted by Chuck Phillips
You mean something like "Printer.print"? When I try this in access I come up with an error that reads "Variable not Defined".
uh... inside access.. tried it myself.. didn't work at all :(
just attempted your suggestion and received a "User-Defined type not defined" error.
'print receipt functions
Dim p As printer
p.Print rstRECEIPT
this is what my code looks like. the "p As printer" is highlighted
Tommorow (Friday) I actually go onsite for testing and debugging and this is the last stumbling block I have to overcome.
yes, I noticed (above post)
I didn't realise that VBA didn't have such object ... sorry... Thought u were doing it from VB.
Could u not create a report instead, and print that?
:eek:Quote:
Originally posted by Chuck Phillips
Tommorow (Friday) I actually go onsite for testing and debugging and this is the last stumbling block I have to overcome.
we must try to overcome it then :)
so u'r entire app is created in Access?
I actually have a report generated at present. The only problem is that the form prints on 8 1/2 x 11 paper. If you attempt to print the report on a receipt printer paper (exact size not known but quite a bit smaller) the words wrap around the receipt.
actually the original is written in FoxPro for DOS. Our client has purchased a new accounting software (written in access) and they are in need of the FoxPro program to be rewritten in access. They want a windows based environment, as well as all the tables being together.
isnt there a special driver for this printer ?
a printer u can select when doing print?
I dont believe so. Just a simple plug and go printer. I will find out for sure tomorow
I must get going now but if you can think of anything please post here as I will check in the morning. Thanks for your time and help. Gonna go home and think on this.
sounds like a special kind of printer to me, like a lable printer.
One of my colleagues programmed one of those.
I think what he had to do was feeding the printer using some spesial chars and the data he wanted to print.
If u'r not sure what printer it is, it would be a bit difficult :)
Reciept printers are standard text based printers, they do not require any special driver. You can use the standard text based printer driver from windows if you want.
All you do is send text to the LPT port it is connected to, Haven't played with VB and this though but an example off the good old days would be like
dir > lpt1
and all the text that gets displayed is sent to the LPT1 port which the printer can handle fine. Reciept Printers are measured in Col size so most times it is a 80 column or 23 column so on and that is the max chars allowed across the width. Hope this helped a little.