Prev: Using a field from one sub form and into another subform
Next: Adding fields from a different query
From: Hoardling1 via AccessMonster.com on 17 Nov 2009 11:09 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? -- Message posted via http://www.accessmonster.com
From: tighe on 19 Nov 2009 11:19 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. "Hoardling1 via AccessMonster.com" wrote: > 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? > > -- > Message posted via http://www.accessmonster.com > > . >
From: Hoardling1 via AccessMonster.com on 19 Nov 2009 12:06 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. tighe wrote: >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? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200911/1
|
Pages: 1 Prev: Using a field from one sub form and into another subform Next: Adding fields from a different query |