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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Rows imported in Windows 2K

Status
Not open for further replies.
Dec 27, 2002
10
US
I have the following VB script set in an event procedure for a button:

Private Sub Command5_Click()
Dim fs As Object
Dim i As Integer
Set fs = Application.FileSearch
With fs
.LookIn = "J:\USB_Requests\Original Requests"
.filename = "*.xls"
If .Execute() > 0 Then
MsgBox "File(s) found: " & .FoundFiles.Count
For i = 1 To .FoundFiles.Count
MsgBox "File found: " & .FoundFiles(i)
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "tbl_USB_Create_Request", .FoundFiles(i), True
Next i
Else
MsgBox "File(s) not found.", vbExclamation
End If
DoCmd.Requery "qry_USB_Create_Request subform"
DoCmd.GoToControl "qry_USB_Create_Request subform"
DoCmd.GoToControl "USB_Date_Submitted"
End With

End Sub

It works fine on an OS WIN95 running EXCEL and ACCESS from OFFICE97. But in OS WIN2K using the same MS OFFICE Programs it doesn't work. Anyone have a correction and reason why?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top