Results 1 to 4 of 4
  1. #1
    Join Date
    May 2008
    Hernando, MS

    Unanswered: new records exports as .txt automatically

    I know nothing about databases and now am trying to change one. This question has probably been answered already, but I couldn't find it in a search.

    I have a database that uses switchboard to create records. The fields in the switchboard once filled in and tabbed through create a record. That record contains a part#, work order #, and quantity. We use a label program that watches the database for new records, once it sees one, it pulls the part#, uses another query to get 4 lines of description per that part#, the work order #, and then prints the quantity required. Works ok but is not very reliable watch software.
    New software, more reliable, but database has to change. I now need the Access database to create a text file, pulling all of the information from 3 different queries, when a new record is created.
    Thoughts on how to accomplish this???

  2. #2
    Join Date
    Nov 2007
    Adelaide, South Australia
    Using VBA in the After Insert event procedure.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Feb 2004
    Chicago, IL
    I agree with StarTrekker. You will want to use the After Insert event of the form where the data is entered. To create the file you can either use VBA and the FileSystemObject or use a combination of FreeFile, Open, Close Write to create the file in the proper location.

    Curious, what kind of printer is it? A little label printer? You might be able to print to it from Access. Does it have a Windows driver? Do you have to install it? Is it in the Printers And Faxes folder? If so, I would think it would be easier to print directly to it by setting up a report in Access.

  4. #4
    Join Date
    Sep 2007
    Global Village
    I know nothing about databases and now am trying to change one.
    I recommend to ask someone who know Access to do it for you
    <<Never Walk on the Traveled Path, Because it only Leads you to where the Others have been.>>
    Graham Bell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts