By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,506 Members | 2,311 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,506 IT Pros & Developers. It's quick & easy.

ACCESS.USING SWITCHBOARD TO MERGE/edit NUMEROUS TEXT FILES

P: 2
i wish to use a "button" on a in access switchboard to edit numerous notepad txt files..these are hql files(health query language files used in healthcare gp systems).
(normally about 20 notepad files,) that are in a given folder c:\mbc .I need to change automatically a section of text ...ie LOCAL(always this) to a variable number ie G123456 that appears in each of these text files.
The format of these files must remain as simple unformatted text.
I would like it so on pressing "the button" a text box comes up to enter the new number ie G123456....can anyone tell me how tis can be done, worth numerous beers!
Sep 20 '07 #1
Share this Question
Share on Google+
1 Reply


nico5038
Expert 2.5K+
P: 3,072
Hmm, this will require some clear mind, so let's leave the beer for a while...

We'll need some VBA code to loop through the files and Replace() the "LOCAL" into the numer you provide on a form.
Just create the form and add a textbox to hold the value and a button to trigger the needed code.

When you check the helpfile for the FileSystem, you'llfind an example how to loop through files.
When having such a file, then the Replace() function can be used to translate the "LOCAL" into the value from your form.

Do you want to give it a try ?

Nic;o)
Oct 5 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.