Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old March 24th, 2003, 02:37 PM
biaz's Avatar
biaz biaz is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 14 biaz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Retrieving info with access module, getting error 3170. Where is the problem?

Please help if you have experience in creating databases
With my knowledge I am not able to solve this by my own.

I'm trying to import excel workbook sheets into access table, but keep getting error messages.
"Error 3170 - Could not find installable ISAM"
I downloaded xbs200.dll (ver. 2.00), but am no wiser, since it doesn't seem to affect anything.

My code goes as follows:
***
Function
.....
tabel = "UusTabel"
Apath = "c:\my documents\db\proov.mdb"
sheetpath = InputBox("Input source file name" _
& Chr(10) & "(full path):", "Import")
Select Case Sheetname
Case Page = 1
Sheetname = "Lisa A.Üldiseloomustus."
Case Page = 2
Sheetname = "Lisa 1.Kütused"
Case Page = 3
Sheetname = "Lisa 1.A Kütuste hinnad" ' etc.
.....
Call ExportExcelSheetToAccess(Sheetname, sheetpath, tabel, Apath)
.....
Private Sub ExportExcelSheetToAccess(Sheetname As String, sheetpath As String, tabel As String, epath As String)
'Should I use different variable names in this sub as parameters maybe?

Dim db As Database
Dim rs As Recordset
Set db = OpenDatabase(epath, True, False, "excel 10.0")

Call db.Execute("SELECT * INTO [database=" & epath & "]." & _
tabel & " FROM " & epath & "." & Sheetname & " ; ")

db.Close
rs.Close
Set db = Nothing
Set rs = Nothing
End Sub
***
Thanks

Last edited by biaz : March 24th, 2003 at 02:42 PM.

Reply With Quote
  #2  
Old March 26th, 2003, 03:51 PM
biaz's Avatar
biaz biaz is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 14 biaz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Think i posted the question on a wrong forum Guess I'll have to rewrite my code.

Function Import ()
DoCmd.TransferSpreadsheet _
acImport,acSpreadsheetTypeExcel8, "NewTableInAccess", "pathToExcelFile", True, "SheetName!Range" '(All if no range)
End Function


IF Anyone knows how to GET RID of Punctuation in the names of ExcelSheets via MS Access VBA Module, post right here.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Retrieving info with access module, getting error 3170. Where is the problem?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway