Auto update a field or cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 160 files (txt) that I need to update just one field (some times 2 to
5) and then send to our customers each month. The field is a number but I'm
keeping it in txt form. I can import the files but then how do I sent up a
form (or something) that all I have to do is enter my data and it will update
all 160 files?
I would then export the data back to txt and send to the cusotmer.
Need to update .2730 (field) each month some time .1420 (feild).
source
FSC 001 **** *** R W 000001.00 000001 0000.2730 + H Y

FSC 002 **** *** C M 000000.00 000000 0001.0000 + H Y

FSC 005 **** 001 R B 000001.00 000001 0000.1420 + H Y


New be
 
I have 160 files (txt) that I need to update just one field (some times 2 to
5) and then send to our customers each month. The field is a number but I'm
keeping it in txt form. I can import the files but then how do I sent up a
form (or something) that all I have to do is enter my data and it will update
all 160 files?
I would then export the data back to txt and send to the cusotmer.
Need to update .2730 (field) each month some time .1420 (feild).
source
FSC 001 **** *** R W 000001.00 000001 0000.2730 + H Y

FSC 002 **** *** C M 000000.00 000000 0001.0000 + H Y

FSC 005 **** 001 R B 000001.00 000001 0000.1420 + H Y


New be

You'll need some VBA code to do this. I would suggest that you have
one 160-row table with the names of all your files, e.g. a text field
containing

"K:\CustomerData\Files\File35.txt"

or whatever your names are.

You would then have a second table with fields matching the text file
fields - if the above is a true sample, twelve fields.

You'll then need VBA code to loop through the table of filenames; run
a delete query emptying the second table; use TransferText to import
the data into it from the current file; run an Update query to update
the field; and then use TransferText to write it back out.

Is 0000.2730 one field or two? How do you decide what needs updating
and to what? You could certainly use an unbound Form to enter the
updates.

It's going to be a bit complex but Access can certainly do this for
you.

John W. Vinson[MVP]
 
Back
Top