View Full Version : Create .Txt File With field data on command button event


CharlesWhiteman
06-12-2007, 05:59 AM
One of the functions of my DB is to generate quotes which is basically a Report which i output using MS document Imaging.

What i would like to be able to do is on a command button generate a txt file containing field data

i.e.

Customer
customerID
Quote Reference
Path to File

I'm not sure about this and am hoping for some clues and examples of code that i can use to figure it out? Many thanks people!

gemma-the-husky
06-12-2007, 06:41 AM
i presume you dont mean you want to save the formatted report, but save some underlying data

i would get the info you want into a query, and then output the query to a text file

the path to file will have to be set in the query either by refernecing some field on a form, or by referncing a global variable

CharlesWhiteman
06-13-2007, 07:33 AM
Thank you for the reply. How would i output the query result to a text file please?

CharlesWhiteman
06-13-2007, 07:35 AM
Also, my Form FrmLetter, is an unbound form so the text boxes in it are not bound to any table so am unsure how to achieve this without creating table dataq which would be basically redundant?