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???
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.