Compile Error

  • Thread starter Thread starter M. Wilson
  • Start date Start date
M

M. Wilson

Hello,

I have the following code in a form.

DoCmd.OpenReport strReportName, acViewPreview, ,
strCriteria, acWindowNormal.

It works fine on all of my user's machines except for
one. This one user recently had her hard drive replaced
so I think that there maybe some Access "tool" that needs
to be loaded. However, I am really not certain what the
problem is.

When she runs the report she gets an error message that
says "Compile Error: Wrong number of arguments or
invalid propery assignment." The .OpenReport in the code
above is highlighed.

If anyone can offer any suggestions, I would be extremely
greatful.

Thanks,

M. Wilson
 
Quite possibly, that is a problem with the References. In a module window,
on the menu, Tools | References. Delete any marked "Missing" and try again.
If it doesn't work, re-check or search for the missing library. Many similar
problems are corrected by getting the references right.

The problem reference doesn't even have to be the one that is giving you
trouble. I say, "References are like apples. One bad one can spoil the whole
barrel."

Larry Linson
Microsoft Access MVP
 
Back
Top