Using Form Data to Create Batch File

  • Thread starter mattc66 via AccessMonster.com
  • Start date
M

mattc66 via AccessMonster.com

Hi All,

Is there a way to create a DOS Batch file from information the user would
input on an ACCESS form?

Or Edit an exsisting BAT file from a form.

Reason- I have a legacy software program that I can run BATCH files to
extract data. I need to change the parameters of the Batch file to extract
certain. Rather then creating hundreds of Batch Files it would be great if I
could have Access create them on the fly and just over-right them each time.

Matt
 
J

John Vinson

Is there a way to create a DOS Batch file from information the user would
input on an ACCESS form?

Yes, you'll need some VBA code to do it, though. See the VBA online
help for the OpenFile and Write operators.

John W. Vinson[MVP]
 
T

twas

A DOS batch file is basically just text with a special file extension; if
you have a basic batch file and parameters already, it should be easy to
generate the right test as a output from Access. There may be easier
approaches, but it depends on what you have in Access and what you need in
the batch files. This will almost certainly require some VBS to run, which
makes me wonder if it might be easier just to do everything in VBS. More
details, please.

- twas
 
T

twas

Should have said "VBA" rather than "VBS" (wish I could blame it on a spell
checker instead of posting at 1 am)
 
Top