iknowu99
09-18-2008, 10:28 AM
Hello Everybody!
This the code i'm testing out. It will not let me run the last line. Error 3027: Cannot update. Database or object is read-only. Help:)
Option Compare Database
Option Explicit
Sub test12()
'----------------------
Dim sSQL As String
Dim sFileType As String
Dim sDestPath As String
Dim sExt As String
Dim sTableQuery As String
Dim dbFailOnError
Dim DB As Database
Set DB = CurrentDb
'sFileType = "Text;"
'sExt = "txt"
sFileType = "HTML Export;"
sExt = "htm"
sDestPath = "C:\TEMP\"
sTableQuery = "Master_DB Query1"
sSQL = "SELECT * INTO [" & sFileType & _
"DATABASE=" & sDestPath & "].[FileName" & _
sExt & "] " & "FROM [" & sTableQuery & "]"
DB.Execute sSQL, dbFailOnError
'-------------
End Sub
This the code i'm testing out. It will not let me run the last line. Error 3027: Cannot update. Database or object is read-only. Help:)
Option Compare Database
Option Explicit
Sub test12()
'----------------------
Dim sSQL As String
Dim sFileType As String
Dim sDestPath As String
Dim sExt As String
Dim sTableQuery As String
Dim dbFailOnError
Dim DB As Database
Set DB = CurrentDb
'sFileType = "Text;"
'sExt = "txt"
sFileType = "HTML Export;"
sExt = "htm"
sDestPath = "C:\TEMP\"
sTableQuery = "Master_DB Query1"
sSQL = "SELECT * INTO [" & sFileType & _
"DATABASE=" & sDestPath & "].[FileName" & _
sExt & "] " & "FROM [" & sTableQuery & "]"
DB.Execute sSQL, dbFailOnError
'-------------
End Sub