Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Sending Escape sequences from MS Access ?

Options
  • 21-01-2008 2:26pm
    #1
    Registered Users Posts: 455 ✭✭


    Hi.

    I am running a report from MS acesss with text from a database table.

    One of the fields require me to select an external font which is contained in the printer rather than in windows. This requires sending an escape sequence followed by the required field.

    I can't seem to get this to work in Access. I can send a flat text file without using Access containing the sequence and it works fine but I need to use Access report as the report contains other database information such as barcodes etc. Any ideas How I may be able to do this in Access?

    Any help appreciated.


Comments

  • Closed Accounts Posts: 81 ✭✭AccessQuery


    maximus02 wrote: »
    Hi.

    I am running a report from MS acesss with text from a database table.

    One of the fields require me to select an external font which is contained in the printer rather than in windows. This requires sending an escape sequence followed by the required field.

    I can't seem to get this to work in Access. I can send a flat text file without using Access containing the sequence and it works fine but I need to use Access report as the report contains other database information such as barcodes etc. Any ideas How I may be able to do this in Access?

    Any help appreciated.

    Afternoon,
    What's the printer in question? Do you have the manual? What does the text file achieve?

    What are the contents of the flat text file? Are they simple ASCII text characters or are there control characters embedded in it?

    What happens if you simply cut and paste all the characters from the text file on to a print line in the access report?

    What access and OP version are you using?

    Regards


  • Registered Users Posts: 455 ✭✭maximus02


    Hi. Thanks for reply

    The printer is a HP Laserjet 4250 which has been specially adapted by an American company to print with a magnetic toner. It contains it's own special fonts which I need to access rather than use windows true type fonts. These printers are adapted and sold with approval of HP.

    I am using Access report to print documents with barcodes and other fields from an Access table. But I need to use a font selected from the printer to print a line of text at the bottom of the document, similar to a cheque.

    I have manuals from the company which gives me escape codes to select the font. This code contains control codes such as 'Escape' or ASCII 27 as well as further characters.

    The printer contains a software utility for sending text files to the printer. If I create a text file containing this escape sequence inc. control characters followed by the characters I wish to print, the characters print correctly in the required font.

    However if I use the same text in a database field, the report prints out the Escape sequence and the text in a standard true type font rather than interpreting the escape codes. I need to be able to tell Access to interprete the code rather than print it. Does this make sense?

    I am using Access 2007 along with Windows XP home edition.

    Thanks again for help


  • Closed Accounts Posts: 81 ✭✭AccessQuery


    maximus02 wrote: »
    However if I use the same text in a database field, the report prints out the Escape sequence and the text in a standard true type font rather than interpreting the escape codes. I need to be able to tell Access to interprete the code rather than print it. Does this make sense?

    Shot in the dark. Can you create table [Printer] with one field [PrintControl].
    Paste the contents of the text file directly into [Printer]![PrintControl]. Now when you print [Printer]![PrintControl] what happens?

    Failing the above can you attach a sample DB with the print control/report your using. Obviously no data wanted!


  • Registered Users Posts: 455 ✭✭maximus02


    Hi again.

    I have already tried what you suggested there. It just prints out the contents of the field including the escape sequence, ina normal font.

    I am going to contact the support people of the american printer company and see how I get on. I'll let you know what happens.

    Thanks again


Advertisement