Error probably caused by lack of library reference

  • Thread starter Thread starter EagleOne@microsoftdiscussiongroups
  • Start date Start date
E

EagleOne@microsoftdiscussiongroups

2003

Getting an error on the last arguement in the following command:

DoCmd.OutputTo acOutputTable, "CHR_ALL_TBL",
"Excel97-Excel2003Workbook(*.xls)", "CHR_ALL_TBL.xls", False, "", 0,
acExportQualityPrint

I get a variable not found re: acExportQualityPrint.

The line of code was Converted VBA from my Home system. The code worked
fine at home. But not at work. What library do I need to reference? Or
different issue?

Any thoughts helpfull!!

EagleOne
 
Arvin, THanks for your time and knowledge.

In VBA window, Reference to DAO360.dll (in the directory as specified) was
already linked in. Therefore I de-linked then re-linked the .dll.

Anything else which will give a variable not defined error?
 
Arvin,

Additional experimenting lead to:

Thinking that the last argument "acExportQualityPrint" may be optional, I
deleted it and pressed on only to get an another error: "The format in which
you are attempting to output the current object is not available"

EagleOne
 
Arvin,

Additional research has found this possibility.

My home machine uses Access 2007 whereas at Work I have Access 2003

THerefore: Access 2003 did not recognize all arguments to:

DoCmd.OutputTo acOutputTable, "CHR_ALL_TBL",
"Excel97-Excel2003Workbook(*.xls)", "CHR_ALL_TBL.xls", False, "", 0,
acExportQualityPrint

That said what does Access 2003 want to see so that I can get an operating
DoDmd?

TIA

EagleOne
 
Take a look in the Help file. Make sure you're in the VB Editor when you
look.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


"EagleOne@microsoftdiscussiongroups"
 
Doug,

Amoung the attempts to fix this:
DoCmd.OutputTo
acFormatXLS,"SND_ALL_AAAUIC_TBL",acFormatXLS,"SND_ALL_AAAUIC_TBL.xls",0

I have looked at the help file in VB Editor. Obviously, I am missing
something.

Thoughts?

EagleOne
 
Got it Doug!!

DoCmd.OutputTo acOutputTable, "SND_ALL_AAAUIC_TBL", acFormatXLS,
"SND_ALL_AAAUIC_TBL.xls",0 ' False also works in lieu of 0
 

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

Back
Top