Button for Open report by Wizard missing Docmd code.

  • Thread starter Hoardling1 via AccessMonster.com
  • Start date
H

Hoardling1 via AccessMonster.com

Has anyone else encountered this on Access 2007.

In forms
I click on the add button from toolbar and create a button. I use the wizard
and set it to open a report. Go through the process, mainly using defaults.
Once on my form, I expect the button to open my report, but it does nothing.

I checked the VB code and it is missing the Docmd statement, it has the
stDocName = to the report name, but no Docmd statement. Is this an Access
2007 error?? or do I need to turn something on?
 
T

tighe

Maybe i'm missing something but when using in 2007, the wizard creates an
embedded macro not VBA for the operation. to get Vb you would need to save
the embedded macro then convert. the result would like similar to
DoCmd.openreport "report", acViewReport, "", "", acNormal

also i would figure that stDocName is variable which the conversion would
not create.
 
H

Hoardling1 via AccessMonster.com

I didn't create any of the code. I just added the button and used the wizard
to open a report. Which it doesn't. I investigated the code behind the
button and found out there was no docmd process, just setting the variable.
Does it work for you? Add a button and use the wizard to open a report.
Then click button to test.
Maybe i'm missing something but when using in 2007, the wizard creates an
embedded macro not VBA for the operation. to get Vb you would need to save
the embedded macro then convert. the result would like similar to
DoCmd.openreport "report", acViewReport, "", "", acNormal

also i would figure that stDocName is variable which the conversion would
not create.
Has anyone else encountered this on Access 2007.
[quoted text clipped - 6 lines]
stDocName = to the report name, but no Docmd statement. Is this an Access
2007 error?? or do I need to turn something on?
 

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