|
-
Oct 11th, 2001, 05:03 PM
#1
Thread Starter
New Member
Printing the contents of a access table
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?
-
Oct 11th, 2001, 05:29 PM
#2
-= B u g S l a y e r =-
-
Oct 11th, 2001, 05:32 PM
#3
Thread Starter
New Member
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.
-
Oct 11th, 2001, 05:33 PM
#4
-= B u g S l a y e r =-
use vb print function? is that an option ?
-
Oct 11th, 2001, 05:35 PM
#5
-= B u g S l a y e r =-
VB Code:
Private Sub Command1_Click()
Dim p As Printer
p.Print "blabla"
p.Print "some more blabla"
p.EndDoc
End Sub
-
Oct 11th, 2001, 05:36 PM
#6
Thread Starter
New Member
You mean something like "Printer.print"? When I try this in access I come up with an error that reads "Variable not Defined".
-
Oct 11th, 2001, 05:37 PM
#7
-= B u g S l a y e r =-
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".
did u try declaring a var as printer (see above sample) ?
-
Oct 11th, 2001, 05:39 PM
#8
-= B u g S l a y e r =-
uh... inside access.. tried it myself.. didn't work at all
-
Oct 11th, 2001, 05:41 PM
#9
Thread Starter
New Member
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
-
Oct 11th, 2001, 05:43 PM
#10
Thread Starter
New Member
Tommorow (Friday) I actually go onsite for testing and debugging and this is the last stumbling block I have to overcome.
-
Oct 11th, 2001, 05:45 PM
#11
-= B u g S l a y e r =-
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?
-
Oct 11th, 2001, 05:46 PM
#12
-= B u g S l a y e r =-
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
-
Oct 11th, 2001, 05:46 PM
#13
-= B u g S l a y e r =-
so u'r entire app is created in Access?
-
Oct 11th, 2001, 05:48 PM
#14
Thread Starter
New Member
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.
-
Oct 11th, 2001, 05:49 PM
#15
Thread Starter
New Member
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.
-
Oct 11th, 2001, 05:53 PM
#16
-= B u g S l a y e r =-
isnt there a special driver for this printer ?
a printer u can select when doing print?
-
Oct 11th, 2001, 05:55 PM
#17
Thread Starter
New Member
I dont believe so. Just a simple plug and go printer. I will find out for sure tomorow
-
Oct 11th, 2001, 05:56 PM
#18
Thread Starter
New Member
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.
-
Oct 11th, 2001, 05:59 PM
#19
-= B u g S l a y e r =-
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
-
Oct 11th, 2001, 06:55 PM
#20
Receipt Printers...
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|