473,748 Members | 2,558 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can anyone recommend a Dot Matrix printer for my DB?

OK, I tried getting and old Newbury Data ND2500 working using the "Generic
/Text only" driver in Win XP. It prints, but I could not find a way to set a
custom page size that matches the paper I am using. So there was no way it
would ever work.

The customer is happy to buy another Dot Matrix printer because the ND2500
can be used elsewhere. So which printer should I get that can plug and play
with Access?

Paul
Dec 20 '05 #1
4 1894
I used the Epson L1000 driver on a number of 24 pin Epson printers. It did a
fair but slow graphic output. The only driver I ever found that would print
actual text was the "Generic /Text only" driver.

"Paul H" <no****@nospam. com> wrote in message
news:k8******** *********@newsf e2-win.ntli.net...
OK, I tried getting and old Newbury Data ND2500 working using the "Generic
/Text only" driver in Win XP. It prints, but I could not find a way to set a custom page size that matches the paper I am using. So there was no way it
would ever work.

The customer is happy to buy another Dot Matrix printer because the ND2500
can be used elsewhere. So which printer should I get that can plug and play with Access?

Paul

Dec 20 '05 #2
1. Does it have to be dot matrix? They're loud and slow and annoying
and bulky... If they're going to buy a new printer, a upscale-model
laser printer is more likely to have the ability to adjust to a number
of different sizes. Alternatively, you could always get one of the
giant commercial high-speed dot matrix printers that looks like a
plotter, but...why?

2.Can you find a more specific or updated driver for your current
printer? http://www.driverguide.com has a whole bunch of different
drivers for any number of different things. You may be able to simply
get a compatible driver and save your client some cash.

Dec 20 '05 #3
On 20 Dec 2005 06:25:13 -0800, "Steve" <th*********@gm ail.com> wrote:
1. Does it have to be dot matrix? They're loud and slow and annoying
and bulky... If they're going to buy a new printer, a upscale-model
laser printer is more likely to have the ability to adjust to a number
of different sizes. Alternatively, you could always get one of the
giant commercial high-speed dot matrix printers that looks like a
plotter, but...why?


I would assume that they have a requirement to use multi layer carbonised paper which requires the impact of a dot
matrix to create the impression on the copy layer(s).

Wayne Gillespie
Gosford NSW Australia
Dec 20 '05 #4
"Paul H" <no****@nospam. com> wrote in
news:k8******** *********@newsf e2-win.ntli.net:
OK, I tried getting and old Newbury Data ND2500 working using the
"Generic /Text only" driver in Win XP. It prints, but I could not find
a way to set a custom page size that matches the paper I am using. So
there was no way it would ever work.

The customer is happy to buy another Dot Matrix printer because the
ND2500 can be used elsewhere. So which printer should I get that can
plug and play with Access?

Paul


In the very, very olden days one did not need a driver for a dot matrix
printer (maybe other types too, my memory is misty about that). One could
just send the printer control codes directly to the printer and then the
text.
I found this necessary (at least it seemed necessary) to complete multi-
copy (like carbon copies, don't know the proper name for them) purchase
orders which had boxes for various pieces of information. The regular
drivers just would not put things where they were supposed to go
consistently. Every ten printings or so they screwed up and POs had
numbers which had to be accounted for so, trashing a PO was not
permitted.

So I wrote my own: (it's amazing how ones style may change over the
years).

Here's the whole module as the naked procedure may need the other
functions to make sense; I left justified the whole thing to try to
minimize evil linebreaking:

Public Function PrintPO(IDNumbe r As Long)
Dim dbs As Database, rcs As Recordset, tdf As TableDef, dbsPathandName As
String, _
criteria As String, Supplier As String, shipTo As String, _
fileName As String, fileNumber As Integer, _
initialize As String, sixLPI As String, tenPitch As String, _
bold As String, doubleStrike As String, halfLine As String, _
eject As String, nonproportional As String, _
printerCodes As String, retVal As Variant, _
lnStr As String, aLines(60) As String, iCount As Integer, _
accTotal As Currency, warnReAccounts As Boolean, nLine As Integer, _
nStartLine As Integer, nStopLine As Integer, _
Description As String, descriptionArra y As Variant, descriptionStri ng As
String, _
asPerAttached As Boolean, whereString As String, _
rcsAccountNumbe rs As Recordset

Dim mString As String, position As Integer, printString As String, _
pst As Currency, gst As Currency, total As Currency, Amount As Currency

initialize = Chr(27) & Chr(64)
sixLPI = Chr(27) & Chr(50)
tenPitch = Chr(27) & Chr(80)
bold = Chr(27) & Chr(69)
doubleStrike = Chr(27) & Chr(71)
nonproportional = Chr(27) & "p0"
eject = Chr(12)
printerCodes = initialize & sixLPI & tenPitch & bold & doubleStrike &
nonproportional

'verify that printer is ready
If MsgBox("Is printer ready and form inserted?", vbYesNo + vbQuestion,
"Print Purchase Order") = vbYes Then

' get the data
' the connect property of the linked tables gives us the path
' for the tables
' we have to open them directly to use their indexes
Set dbs = CurrentDb()
Set tdf = dbs.TableDefs(" Accounts")
dbsPathandName = Mid(tdf.Connect , 11)
dbs.Close

Set dbs = OpenDatabase(db sPathandName)

'data
' fill the aLines array wiith strings of 80 blank characters
lnStr = Space(80)
For iCount = 1 To 60
aLines(iCount) = lnStr
Next

'deal with accounts first
Set rcs = dbs.OpenRecords et("Accounts Charged", dbOpenTable)
rcs.Index = "Order ID Number"
rcs.Seek "=", IDNumber
Set rcsAccountNumbe rs = dbs.OpenRecords et("Accounts", dbOpenTable)
rcsAccountNumbe rs.Index = "Account Number"

iCount = 4
accTotal = 0
Do While rcs![Order ID Number] = IDNumber
If iCount < 9 Then
If fUseNewNumbers Then
rcsAccountNumbe rs.Seek "=", rcs![Account Number]
aLines(iCount) = stuff(aLines(iC ount), 35, Trim(rcsAccount Numbers![New
Account Number]))
Else
aLines(iCount) = AccountFormat(r cs![Account Number], aLines(iCount))
End If
aLines(iCount) = stuff(aLines(iC ount), 68, padleft(Format( rcs![Amount],
"currency") , 11))
End If
iCount = iCount + 2
accTotal = accTotal + rcs![Amount]
rcs.MoveNext
If rcs.EOF Then
Exit Do
End If
Loop

aLines(10) = stuff(aLines(10 ), 68, padleft(Format( accTotal, "currency") ,
11))
warnReAccounts = iCount > 8

rcs.Close

' sundry data from orders
Set rcs = dbs.OpenRecords et("Orders", dbOpenTable)
rcs.Index = "PrimaryKey "
rcs.Seek "=", IDNumber

aLines(4) = stuff(aLines(4) , 2, rcs![Date])
aLines(4) = stuff(aLines(4) , 13, rcs![Requisitioned By])
aLines(6) = stuff(aLines(6) , 2, rcs![Authorized By])

If rcs![US Funds] Then
aLines(10) = stuff(aLines(10 ), 35, "US Funds")
aLines(57) = stuff(aLines(58 ), 35, "US Funds")
End If

Supplier = rcs![Supplier]
shipTo = rcs![Ship To]

rcs.Close

' supplier
aLines(19) = stuff(aLines(19 ), 6, Supplier)

Set rcs = dbs.OpenRecords et("Suppliers" , dbOpenTable)
rcs.Index = "PrimaryKey "
rcs.Seek "=", Supplier
mString = rcs![Address]
rcs.Close

iCount = 1
Do While Len(mString) > 0
position = InStr(1, mString, Chr(13) + Chr(10), 0)
Select Case position
Case Is > 0
printString = Left(mString, position - 1)
mString = Mid(mString, position + 2)
Case Else
printString = mString
mString = ""
End Select
aLines(19 + iCount) = stuff(aLines(19 + iCount), 6, printString)
iCount = iCount + 1
Loop

' Ship To
aLines(19) = stuff(aLines(19 ), 46, shipTo)

Set rcs = dbs.OpenRecords et("Ship To", dbOpenTable)
rcs.Index = "PrimaryKey "
rcs.Seek "=", shipTo
mString = rcs![Address]
rcs.Close

iCount = 1
Do While Len(mString) > 0
position = InStr(1, mString, Chr(13) + Chr(10), 0)
Select Case position
Case Is > 0
printString = Left(mString, position - 1)
mString = Mid(mString, position + 2)
Case Else
printString = mString
mString = ""
End Select
aLines(19 + iCount) = stuff(aLines(19 + iCount), 46, printString)
iCount = iCount + 1
Loop

'Items
Set rcs = dbs.OpenRecords et("Items Ordered", dbOpenTable)
rcs.Index = "Order ID Number"
rcs.Seek "=", IDNumber

gst = 0
pst = 0
total = 0
nLine = 28

Do While rcs![Order ID Number] = IDNumber
If Not rcs![Unit] = 0 Then
Amount = rcs![Quantity] / rcs![Unit] * rcs![Price]
Else
Amount = 0
End If

nLine = nLine + 1
If nLine < 52 Then
If rcs![Quantity] > 0 Then
aLines(nLine) = stuff(aLines(nL ine), 2, padleft(rcs![Quantity], 6))
aLines(nLine) = stuff(aLines(nL ine), 55, padleft(Format( rcs![Price],
"currency") , 11))
aLines(nLine) = stuff(aLines(nL ine), 66, padleft(rcs![Unit], 4))
aLines(nLine) = stuff(aLines(nL ine), 70, padleft(Format( Amount,
"currency") , 11))
End If
Description = Nz(rcs![Description])
descriptionArra y = memoLines(Descr iption, 45)
nStartLine = LBound(descript ionArray)
nStopLine = UBound(descript ionArray)

For iCount = nStartLine To nStopLine
If nLine < 52 Then
descriptionStri ng = descriptionArra y(iCount)
aLines(nLine) = stuff(aLines(nL ine), 10, descriptionStri ng)
nLine = nLine + 1
Else
Exit For
End If
Next
End If

' add amounts to totaling variables
total = total + Amount
gst = gst + rcs![GST Rate] * Amount
pst = pst + rcs![PST Rate] * Amount

rcs.MoveNext
If rcs.EOF Then
Exit Do
End If
Loop

rcs.Close
rcsAccountNumbe rs.Close
dbs.Close

asPerAttached = (nLine > 51)

If asPerAttached Then
For iCount = 28 To 51
aLines(iCount) = lnStr
Next
aLines(28) = stuff(aLines(28 ), 10, "As Per Attached")
MsgBox "There are too many items to be printed on one Purchase Order" & _
Chr(13) & Chr(10) & "Items will be printed on an attachment."
End If

aLines(51) = stuff(aLines(48 ), 70, padleft(Format( total, "currency") ,
11))
aLines(53) = stuff(aLines(48 ), 70, padleft(Format( gst, "currency") , 11))
aLines(55) = stuff(aLines(48 ), 70, padleft(Format( pst, "currency") , 11))
aLines(57) = stuff(aLines(48 ), 70, padleft(Format( gst + pst + total,
"currency") , 11))

' open the print file
fileName = DLookup("Port", "Printer Port", "ID = 1")
fileNumber = FreeFile()
Open fileName For Output As fileNumber

' printer codes
Print #fileNumber, printerCodes

' data
For iCount = 1 To 60
Print #fileNumber, aLines(iCount)
Next

' return printer to original state
Print #fileNumber, initialize

Close #fileNumber

If warnReAccounts Then
retVal = MsgBox("There are more than three account entries; Please, enter
the extra entries manually after the PO is printed.", vbCritical,
"Warning")
End If

If asPerAttached Then
whereString = "[Order ID Number] =" & IDNumber
DoCmd.OpenRepor t "As Per Attached", acViewPreview, , whereString
End If

End If
End Function

Private Function AccountFormat(a ccountNumber As String, lnStr As String)
As String

accountNumber = padRight(accoun tNumber, 20)
lnStr = stuff(lnStr, 35, Mid(accountNumb er, 1, 2))
lnStr = stuff(lnStr, 39, Mid(accountNumb er, 4, 3))
lnStr = stuff(lnStr, 45, Mid(accountNumb er, 8, 3))
lnStr = stuff(lnStr, 50, Mid(accountNumb er, 12, 3))
lnStr = stuff(lnStr, 55, Mid(accountNumb er, 16, 1))
lnStr = stuff(lnStr, 58, Mid(accountNumb er, 18, 3))
AccountFormat = lnStr

End Function

Private Function padRight(cStrin g, pad As Integer) As String
cString = Trim(cString)
Select Case Len(cString)
Case Is < pad
padRight = cString & String(pad - Len(cString), " ")
Case Is > pad
padRight = Left(cString, pad)
Case Else
padRight = cString
End Select
End Function
Private Function padleft(cString , pad As Integer) As String
cString = Trim(cString)
Select Case Len(cString)
Case Is < pad
padleft = String(pad - Len(cString), " ") & cString
Case Is > pad
padleft = Right(cString, pad)
Case Else
padleft = cString
End Select
End Function

Private Function stuff(original As String, position As Integer, INSERT As
String)
Dim leftPart As String, rightPart As String
leftPart = Left(original, position - 1)
rightPart = Mid(original, position + Len(INSERT))
stuff = leftPart & INSERT & rightPart
End Function

Private Function memoLines(memo As String, lineLength As Integer) As
Variant

Dim workingString As String, iCount As Integer, element As Integer,
character As String
ReDim lineArray(0) As String

workingString = Trim(memo)
element = 0

Do While Len(workingStri ng) > lineLength
ReDim Preserve lineArray(eleme nt)
If (InStr(1, workingString, " ") > lineLength) Or (InStr(1,
workingString, Chr(13)) > lineLength) Then
lineArray(eleme nt) = Trim(Left(worki ngString, lineLength))
workingString = Trim(Mid(workin gString, lineLength + 1))
Else
For iCount = lineLength To 1 Step -1
character = Mid(workingStri ng, iCount, 1)
Select Case character
Case Is = " "
lineArray(eleme nt) = Trim(Left(worki ngString, iCount - 1))
workingString = Trim(Mid(workin gString, iCount + 1))
Exit For
Case Is = Chr(10)
lineArray(eleme nt) = Trim(Left(worki ngString, iCount - 2))
workingString = Trim(Mid(workin gString, iCount + 1))
Exit For
End Select
Next iCount
End If
element = element + 1
Loop
Do While InStr(1, workingString, Chr(13)) > 0
ReDim Preserve lineArray(eleme nt)
iCount = InStr(1, workingString, Chr(13))
lineArray(eleme nt) = Trim(Left(worki ngString, iCount - 1))
workingString = Trim(Mid(workin gString, iCount + 2))
element = element + 1
Loop
If Len(workingStri ng) > 0 Then
ReDim Preserve lineArray(eleme nt)
lineArray(eleme nt) = workingString
End If
memoLines = lineArray

End Function

--
Lyle Fairfield
Dec 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4364
by: Fred | last post by:
Hi. Sorry, but I don't know where else to ask. I wrote a access shipping database and we currently use the web interface for DHL to print shipping labels. That means we have to manualy transpose shipto info to the DHL web interface to print the 8 x 11 labels. We ship between 0 and 20 packages a day. If I get DHL pinfeed DHL shipping labels and a matrix printer, can I just print the labels directly from my database instead of dealing...
4
3200
by: Salad | last post by:
I'm developing an app where the print output will be on a dot-matrix printer. I suppose the printers will either be an Epson or Okidata, not really sure at this point. I, unfortunately, do not have a dot matrix anymore. Can I design my reports using TrueType fonts? Should I only use Courrier fonts? And if so, is there a recommended point size? Will page ejects work OK? Any other caveats? Thanks
2
4083
by: Ryan Gregg | last post by:
I'm working on a project where I need to be able to print a single line at a time to a dot matrix printer. Essentially we have a log printer and each time an event occurs on the system I need to have the printer print a line that relates to what the event was. From what I can see of the printer model in .Net, it's mostly document based. Is there any way to have it print a single line to the printer (and have the printer actually output...
1
1760
by: Tancev Sasa | last post by:
I am interesting how to determin is the selected printer a dot-matrix printer or is it a laser printer What property is relevant to detrmin what type is selected printer
1
2874
by: Paul H | last post by:
I am developing a database where some reports need to print to a laser and some need to print to a dot matrix printer. I am not interested in how to do this programmatically, I will let the user manually select the printer for each report, my question is..... Is printing to a dot matrix printer the same (as far as Access in concerned) as printing to a laser or inkjet printer? Do I just create the report, set the margins and click...
3
5249
by: Ivica Muruzovic | last post by:
Is there any source code for printing text file directly to dot-matrix printer without involving windows (like in DOS mode)
4
9436
by: Joza | last post by:
Hi! Can somebody give me a piece of code how to send data to dot matrix printers? I have used google for example but nothing that can help me. I'm using C#. Thanx. J.
3
3674
by: Rich Kayton | last post by:
I have an application that is currently a DBASE/Clipper application. We print out a variety of custom labels on Epson DOT matrix printers. I would like to be able to print these labels. I am somewhat familiar with using the commercially available labels but I don't know if I can print my custom designed labels. By custom designed I mean that the line spacing of the preprinted text has been designed with the 10 or 17 characters per inch....
1
5417
by: amcgary | last post by:
Hello, I am trying to print a System.Drawing.Printing.PrintDocument to a dot matrix printer using C# .NET. I have created an instance of the PrintDocument and create a event handler for the PrintPage property of the PrintDocument. PrintDocument document = new PrintDocument(); document.PrintPage += new PrintPageEventHandler(pd_PrintInvoicePage); document.Print(); However, when I try to print to the dot matrix printer the printer...
0
8994
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8831
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9555
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4878
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.