Martin Reid
mwp.reid at qub.ac.uk
Mon Oct 16 15:38:32 CDT 2006
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