extracting data from a table as string

Lawrence Gould

New member
Local time
Today, 08:09
Joined
Nov 15, 2005
Messages
5
I need to be able to extract individual fields from a table as strings in order to then send this data to my EPOS printer (which will accept only strings to print) I have created the table with a query so the question could equally be how can i output strings as query results. Im using Access97 HELP!!
I have tried to set up a ADODB.Connection but either Access 97 wont accept it or i've got the coding wrong
 
You should be able to use the FORMAT function to convert numeric and dates into strings. But why not just create a report for the printer instead? Just use a text driver for the printer?
 
converting table data to strings

I am using a serial epos printer with Netcomm.ocx serial port com Active x to open the port and send strings etc, Ineed to layout 3 fields on 90mm wide paper and Windows drivers are too restrictive i.e you have to set page length and i require that the printer cuts the receipt to any length according to how many items are sold etc also windows drivers slow the whole process down too much. I have managed, with use of the above , to print a receipt almost instantaneously and cut it to its required length . I have even printed the first line only of the data i require to be printed by using the build function to point the string to the required field in the required table. What i cant do is print the next line and the next line etc?
 
Are you ending each string with the carriage return line feed character?
There is a vb constant or you can create your own via CRLF as string, CRLF = chr(10) & chr(13).

Also typically to end a text file (which is what you are basically sending to the printer) you need to send a control Z (do not know the character/s value) and if you hit the end of a page you might need to send a formfeed (chr(12).
 
Last edited:

Users who are viewing this thread

Back
Top Bottom