Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to open the wizard reports with vba

Status
Not open for further replies.

BigBud

Programmer
Mar 25, 2003
10
0
0
BE
Hi,

I have a button on my form that has to open the wizard from access itself to make reports.

I have the following code but it gives me a type mismatch error:

Private Sub cmdRapportMaken_Click()

Application.Run "acwztool.frui_entry", "tblFamilie&Kennissen", "acReport"

End Sub

Can someone please give me the solution or another way to invoke the wizard reports with vba...
 
Hi BigBud,

I don't know if it's the whole solution, but acReport is an Access constant and by putting it in quotes you are making it a string - hence the type mismatch. try it without the quotes.

Enjoy,
Tony
 
Tony,

Thanks for this wonderfull solution. It did fix my type mismatch error! :)

Now I get a dialog box that says: "The form name 'frui_frmMain' is misspelled or refers to a form that doesn't exist."

Strange...Someone ?
 
BigBud,

I have Access 97 but the 97 version from your link works fine for me. Maybe you are missing some References (Tools > References in the Module Editor). May need a bit of trial and error.

Enjoy,
Tony
 
Seems that there are to many references to check...I'm in trouble... :(
 
I have the solution!

The site I mentioned earlier made a mistake. It had to be:
Application.Run "acwzmain.frui_entry", "tblFamilie&Kennissen", acReport

acwztool must become acwzmain

Thx for the help everybody...

BigBud
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top