Solved

NEED SOME BODY TO TEST THIS CODE

Posted on 2001-06-06
3
151 Views
Last Modified: 2010-05-02
Hi peeps,

Need somebody to cut and paste the code below and try it on a dot matrix printer.

it must be a dot matrix.

I dont have one and I need to start writing this printer module for a client.

CREATE A COMMAND BUTTON & paste the code

Private Sub Command1_Click()
Open "c:\database\paidbase.dat" For Input As 1
Printer.Print "Complete paid report"
While Not EOF(1)
Input #1, NOTENUMBER, DELIVERY, SERVICE, ITEMS, COMPANY, ADD1, ADD2, ADD3, LOCATION, POSTTOWN, postcode, NOTES1, despatchref, WEIGHT, CODATE, PAIDDATE, paidby
Printer.Print Tab(1); despatchref; Tab(25); COMPANY
Wend
Close #1
End Sub

YOU WILL ALSO need to change the path and the variables.

i just need to know that the printer.print method ive used will work. so please dont change this to much.

if anybody can show a 100% way of printing to the dot matrix without any errors then that wouls be appricated.

right im off to work.

ill read the comments at work when my boss has vanished.
lol

cheers
andy
0
Comment
Question by:Microsoft
3 Comments
 
LVL 10

Expert Comment

by:caraf_g
ID: 6159518
can you speak up a little?
0
 
LVL 2

Author Comment

by:Microsoft
ID: 6159690
can i speak up ???????

tell me more
0
 
LVL 6

Accepted Solution

by:
sharmon earned 80 total points
ID: 6161567
I don't have your dat file so I couldn't try it exactly, but here is a similar routine that works just fine.  The only thing I seen missing from yours was Printer.EndDoc

Sub PrinterTest()
  Dim fld1(2) As String
  Dim fld2(2) As String
 
  fld1(0) = "Test 1"
  fld2(0) = "Company 1"
  fld1(1) = "Test 2"
  fld2(1) = "Company 2"
  fld1(2) = "Test 3"
  fld2(2) = "Company 3"
 
  Printer.Print "Complete paid report"
 
  Dim i As Integer
  For i = 0 To 2
    Printer.Print Tab(1); fld1(i); Tab(25); fld2(i)
  Next i

  Printer.EndDoc
End Sub
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel Vlookup to move data back to source. 4 90
vb6 connector to mongodb 2 81
Prevent user closing word document opened with VB6 6 74
Zip Folders Using Chilkat Routines 1 38
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question