acForm

D

dirtybarry

Can some kind person assist me with the following problem:
Works with Access 2002 ...
DoCmd.OutputTo acForm, rs![ReportName], "MicrosoftExcelBiff8(*.xls)",
xlsname, False, "", 0
Does not work with Access 2000 ... get a message about wrong number of
parameters.

What is the difference between acForm 2002, and acForm 2000?
Thanks
 
K

Klatuu

It would not be the acForm. That is just a constant that returns a 2 as does
acOutPutForm. Always has.
I think this is the problem:
"MicrosoftExcelBiff8(*.xls)"
Try using the constant for for a spreadsheet format:
acFormatXLS
 
D

dirtybarry

Thanks Klatuu,

You are correct in that it was not the acForm, however I'm a bit annoyed
that I cannot find any verbage in the Help junk for v 2002 as there is in v
2000 called Action Constants, which desribes acForm.

However the real problem is this: v 2002 needs 6 arguments for acOutputTo,
while v 2000 only allows 5 arguments for acOutputTo. I removed the last
argument and bingo, it works in 2000. However this means I have to do
something tricky so that my application can work with either 2000 or 2002.
Beautiful. Thanks Mr. Gates!!!!! Guess maybe there is some way to check and
see what version of Access my application is running in, and then use either
the 5 argument command or the 6 argument command based on version.

Thanks again.
--
dirtybarry


Klatuu said:
It would not be the acForm. That is just a constant that returns a 2 as does
acOutPutForm. Always has.
I think this is the problem:
"MicrosoftExcelBiff8(*.xls)"
Try using the constant for for a spreadsheet format:
acFormatXLS

--
Dave Hargis, Microsoft Access MVP


dirtybarry said:
Can some kind person assist me with the following problem:
Works with Access 2002 ...
DoCmd.OutputTo acForm, rs![ReportName], "MicrosoftExcelBiff8(*.xls)",
xlsname, False, "", 0
Does not work with Access 2000 ... get a message about wrong number of
parameters.

What is the difference between acForm 2002, and acForm 2000?
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top