 |
HOW TO

Relates to: MOS XP Master | MOS XP Expert | MOS XP | MOS 2000 Master | MOS 2000 Expert | MOS 2000
Try this out to export from an Access database to a text, htm, xls, etc.
file. Export a table or a stored query. '---------------------- Dim
sSQL As String Dim sFileType As String Dim sDestPath As String Dim sExt
As String Dim sTableQuery As String
sFileType = "Text;" sExt =
"txt" sDestPath = "C:\Temp\" sTableQuery = "tCustomers"
sSQL =
"SELECT * INTO [" & sFileType & _ "DATABASE=" & sDestPath &
"].[FileName" & _ sExt & "] " & "FROM [" & sTableQuery &
"]"
DB.Execute sSQL, dbFailOnError
'------------- Try these out
too: sFileType = "HTML Export;" sExt = "htm" '--- sFileType =
""Excel 4.0;" sExt = "xls" '---Also: "dBase III;" "dBase
IV;" "dBase 5.0;" "Lotus WK1;" '--- I'm still trying to get it to work
using parameterized stored queries...
|
|
 |
|
 |
|