I'm getting an error (see below) when I get to DoCmd.OutputTo command at the end of this code.
Dim db As DAO.Database
Set db = CurrentDb
Dim qryOut As QueryDef
db.QueryDefs.Delete "tmp"
Set qryOut = db.CreateQueryDef("tmp", q2$)
DoCmd.OutputTo acOutputQuery, "tmp", xlCSVMSDOS, fileName, False
Note's:
1. q$ is a variant containing the sql statement.
2. fileName is a string variable containing the full path info with the name and ends in the .cvs extension.
3. I'm running this in MS Access 2000 in WinXP.
The error is # 2282 : "The formats that enable you to output data as a Microsoft Excel, rich-text format, MS-DOS text, or HTML file are missing from the Windows Registry."
Anyone have any ideas?
Thanks!
- Bruce
Dim db As DAO.Database
Set db = CurrentDb
Dim qryOut As QueryDef
db.QueryDefs.Delete "tmp"
Set qryOut = db.CreateQueryDef("tmp", q2$)
DoCmd.OutputTo acOutputQuery, "tmp", xlCSVMSDOS, fileName, False
Note's:
1. q$ is a variant containing the sql statement.
2. fileName is a string variable containing the full path info with the name and ends in the .cvs extension.
3. I'm running this in MS Access 2000 in WinXP.
The error is # 2282 : "The formats that enable you to output data as a Microsoft Excel, rich-text format, MS-DOS text, or HTML file are missing from the Windows Registry."
Anyone have any ideas?
Thanks!
- Bruce