Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro Condition Question

Status
Not open for further replies.

dnelson24

IS-IT--Management
Apr 1, 2002
59
US
Thank you for your help in advance!!!!

I have 2 '.txt' files in C:\temp, well actually at one particular point in time there is either 1 '.txt' or the other '.txt'! I would like to "Autoexec macro" a MS Access database that when the database opens the Autoexec macro runs either macro1 or macro2 based on the existence of either '.txt'1 or '.txt'2?

Is there something I put in as a condition to check for the existence of either .txt1 or .txt2 and then run macro1 or macro2 based on this result?


Thanks
David

 
Oh and I have both .txt1 and .txt2 linked as tables into the database.
 
You may consider a VBA procedure playing with the Dir function.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top