|
-
Jan 12th, 2004, 03:23 PM
#1
Thread Starter
Hyperactive Member
what is wrong with this?
Access Module
Public Function ImportData()
Dim dbs as database
Dim Rst as recordset
Dim mysql as string
Set dbs = Opendatabase(CurrentDb)
mySql = "Select * from Tbl_GetData"
Set rst = dbs.openrecordset(mySql) 'error occures here
Do Until rst.EOF
dbtype = rst.Fields(4).Value
filename = rst.Fields(3).Value
PathName = rst.Fields(2).Value
TableName = rst.Fields(1).Value
DoCmd.DeleteObject acTable, TableName
DoCmd.TransferDatabase acImport, dbtype, PathName, acDefault, filename, TableName, 0, True
rst.MoveNext
Loop
rst.close
dbs.close
End Function
Swoozie
Somedays you just should not get out of bed.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|