D
Denver
hi,
i have a list box that displays all imported weekly report....
SELECT [Name] FROM MSysObjects WHERE [Type]=1 AND [Name] LIKE
"*exception06W*" ORDER BY [Name];
i have this Command0 that imports my weekly report to Access and i have this
code...
On Error GoTo Err_Command0_Click
Dim i As Integer
For i = 0 To List1.ListCount - 1
If List1.Selected(i) Then
DoCmd.TransferSpreadsheet acImport, List1.Column(0, 1), _
"D:\" & List1.Column(0, i) & ".xls", True, ""
MsgBox "Table is already Imported"
End If
Next i
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
the problem is when i click on this Command0 nothing will happen...
what do else do i need to write from this code? or what do i miss to write?
i want that when i click Command0 it prompts drive D:\ window so that
users have the option to choose what to import..
hope there is someone is kind to help me with this code...
thanks
i have a list box that displays all imported weekly report....
SELECT [Name] FROM MSysObjects WHERE [Type]=1 AND [Name] LIKE
"*exception06W*" ORDER BY [Name];
i have this Command0 that imports my weekly report to Access and i have this
code...
On Error GoTo Err_Command0_Click
Dim i As Integer
For i = 0 To List1.ListCount - 1
If List1.Selected(i) Then
DoCmd.TransferSpreadsheet acImport, List1.Column(0, 1), _
"D:\" & List1.Column(0, i) & ".xls", True, ""
MsgBox "Table is already Imported"
End If
Next i
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
the problem is when i click on this Command0 nothing will happen...
what do else do i need to write from this code? or what do i miss to write?
i want that when i click Command0 it prompts drive D:\ window so that
users have the option to choose what to import..
hope there is someone is kind to help me with this code...
thanks