Solved

NEED SOME BODY TO TEST THIS CODE

Posted on 2001-06-06
3
152 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
using Access 8 75
VB6 - Compare and highlight cell not the same 3 53
How to read File Date Created using VB6 8 52
Export Data to Different .csv Files 26 114
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

829 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