[AccessD] Load fromtext

Beach Access Software bchacc at san.rr.com
Mon Oct 16 17:22:03 CDT 2006


What error?  What's in strTemp at that moment?

Rocky


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Martin Reid
Sent: Monday, October 16, 2006 1:39 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] Load fromtext

anyone see anyhting wrong with this. Keeps erroring out at the Case Form. 
 
Here is a form name Form_Customer Orders Subform.txt
 
Public Sub loadup()
On Error GoTo Err_loadup
Dim strTemp As String
strTemp = Dir("C:\Forms\*.txt")
Do Until strTemp = ""
        Select Case UCase(Left(strTemp, 4))
                Case "FORM"
                Application.LoadFromText acForm, Mid(strTemp, InStr(1,
strTemp, "_", vbTextCompare) + 1), "C:\forms\" & strTemp
                Case "REPO"
                Application.LoadFromText acReport, "test", "C:\Forms\" &
strTemp
        End Select
        strTemp = Dir
Loop
Exit_loadup:
Exit Sub
Err_loadup:
        MsgBox Err.Description, Err.Number
        Resume Exit_loadup
    Resume 0    '.FOR TROUBLESHOOTING
End Sub
 
 
Martin WP Reid
Training and Assessment Unit
Riddle Hall
Belfast
 
tel: 02890 974477
 

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.4/476 - Release Date: 10/14/2006
 
  




More information about the AccessD mailing list