David McAfee
davidmcafee at gmail.com
Thu Oct 28 16:02:32 CDT 2010
Yeah, the format event doesn't fire for me in A2007 either. This messed me up on users that were upgraded. According to Allen Browne: http://thedailyreviewer.com/office/view/access-2007---on-format-eventdoesnt-fire-seemingly-108219700 "A2007 does not fire these events in the new Report view. The should fire in Preview or Normal views." On Thu, Oct 28, 2010 at 1:54 PM, Rocky Smolin <rockysmolin at bchacc.com> wrote: > Oh. 2007. All bets are off. Actually not familiar with acViewReport > parameter - must be new for 2007? What's it mean? > > Rocky > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Thursday, October 28, 2010 1:47 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] How to suppress specific report lines while > usingacViewReport > > Rocky, > > Thanks for the help, I appreciate it. > > It appears that for some reason the Format event is not getting initiated > when I use "acViewReport". > > For a quick test, I simply put a MSGBOX in the Format event and opened the > report. I did not receive any message. > > I am using 2007, in case that makes a difference. > > Thanks again, > Brad > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin > Sent: Thursday, October 28, 2010 3:31 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] How to suppress specific report lines > whileusingacViewReport > > Brad: > > I use the Format event of the Detail section all the time to do this. > Preview or Print shouldn't matter. > > I use: > > If Nz(Me.fldMWCIInventoryQuantity) = 0 And Nz(Me.Allocation) = 0 Then > Me.MoveLayout = False > Me.NextRecord = True > Me.PrintSection = False > End If > > Sub in your own conditions on the If. This was cribbed directly from the > Detail_Format event module. But it works in the Format event of any > section. > > HTH > > Rocky > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Thursday, October 28, 2010 1:09 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] How to suppress specific report lines while > usingacViewReport > > We are using this command to open a Report DoCmd.OpenReport "Report100", > acViewReport, "", "", acNormal > > I would like to suppress some detail lines and subtotals based on the value > of another field. > > The "On Format" event apparently does not get initiated with acViewReport > > The "On Paint" event does get initiated and can detect the conditions when > we would like to suppress a line by looking at the value of a field. > > The catch is that when I try to use > > Me.ABC.Visible = False > > I receive the following > Error 32521 - You can't change the value of this property in the OnPaint > event > > There is probably an easy way to do this. I must be missing something. > > Thanks, > Brad > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > This message has been scanned for viruses and dangerous content by > MailScanner, and is believed to be clean. > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >