How do I get Access to create a text file built up from data from a query?
I have to get a value from a barcode reader that reads a JobNumber open the query with that JobNumber or perhaps a find record? And get the following values as below
The query should find only one record that shows JobNumber, Length, Width and Thickness in separate columns. (It has more columns than that but it is the procedure I need) I am giving instructions to a computer controlled machine in something called G Code, but I have to create the G Code it should look something like this:
With this code the machine would cut a square, length x width x thickness
G00 X0 Y0 Z (Thickness +20) ‘Go to start point’
G01 X (Length) Y0 Z0 ‘Bring the cutter down and cut along the length
G01 X0 Y-(Width) Z0 ‘Cut along the width. Etc.
G01 X-(Length) Y0 Z0
G01 X0 Y(Width) Z0
G01 X(Length)+50 Z0
G00 X0 Y0 Z0
I know I have to write everything that is not a field in my query but how do I get the values from the query?
How do I get code to do this, create a text file named JobNumber and put that file into a folder on my C Drive. Do I need to generate it in a memo field and export it or is there another way?
Thinking about it it’s a bit like a mail merge letter really I guess.