Solved

NEED SOME BODY TO TEST THIS CODE

Posted on 2001-06-06
3
155 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month5 days, 3 hours left to enroll

636 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