[AccessD] Loadfromtext

DWUTKA at marlow.com DWUTKA at marlow.com
Mon Sep 25 14:54:41 CDT 2006


Dim strTemp as string
strTemp=Dir("C:\forms\*.txt")
Do until strTemp=""
	Select Case Ucase(Left(strTemp,4))
		Case "FORM"
		Application.LoadFromText acForm,"test","C:\forms\" & strtemp
		Case "REPO"
		Application.LoadFromText acReport,"test","C:\forms\" &
strtemp	
......
....
	End Select
	Strtemp=Dir
Loop

Drew

-----Original Message-----
From: Martin Reid [mailto:mwp.reid at qub.ac.uk] 
Sent: Monday, September 25, 2006 10:28 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Loadfromtext

I want to loop over a folder contain X number of text files. Any ideas. For
example
 
Application.LoadFromText acForm, "test", "C:\forms\Form_Customer List.txt"

Instead of a single file I need them all BUT some are prefixed FORM,
REPORT,MODULE, QUERY and I need to change the constant accordingly.
 
I know I can run one process for each type but would it be possible to do
them all in the proper squence in one hit.
 
Martin
 
Martin WP Reid
Training and Assessment Unit
Riddle Hall
Belfast
 
tel: 02890 974477
 
 



More information about the AccessD mailing list