Setting Report field properties on open

I am trying to set a field so it does not get printed in a report when it 
opens.

I used to OpenARG statement and it passes the variable fine.  However when 
trying to turn the field visiblity to false I get an error.  Strange?????

Can you change report fields visibility so certain fields do not get printed 
on the fly like this?

I tried this with no luck.

Private Sub Report_Open(Cancel As Integer)

    If Not IsNull(Me.OpenArgs) Then
        InputArgs = Me.OpenArgs
        Select Case InputArgs
            Case "NoValues"
                txtUM_QTY.Report.Visible = False  '<<< Fails here and don't 
knwo why????
            Case Else
        End Select
    End If

End Sub

Thank you in advance,
Mike 


0
Michael
10/24/2007 5:55:10 PM
access.reports 4434 articles. 0 followers. Follow

2 Replies
571 Views

Similar Articles

[PageSpeed] 6

On Wed, 24 Oct 2007 13:55:10 -0400, Michael Kintner wrote:

> I am trying to set a field so it does not get printed in a report when it 
> opens.
> 
> I used to OpenARG statement and it passes the variable fine.  However when 
> trying to turn the field visiblity to false I get an error.  Strange?????
> 
> Can you change report fields visibility so certain fields do not get printed 
> on the fly like this?
> 
> I tried this with no luck.
> 
> Private Sub Report_Open(Cancel As Integer)
> 
>     If Not IsNull(Me.OpenArgs) Then
>         InputArgs = Me.OpenArgs
>         Select Case InputArgs
>             Case "NoValues"
>                 txtUM_QTY.Report.Visible = False  '<<< Fails here and don't 
> knwo why????
>             Case Else
>         End Select
>     End If
> 
> End Sub
> 
> Thank you in advance,
> Mike

What is this line?
txtUM_QTY.Report.Visible

Is [txtUM_QTY] the name of a control? If so, what is .Report?
You wish to make the control not visible if the OpenArgs = "NoValues"?

Private Sub Report_Open(Cancel As Integer)
     If Not IsNull(Me.OpenArgs) Then
     		Me![txtUM_QTY]. Visible = Not Me.OpenArgs = "NoValues"
     End If
End Sub
-- 
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
0
fredg
10/24/2007 6:35:23 PM
Thank you Fred!!!  That worked great!!!!!


"fredg" <fgutkind@example.invalid> wrote in message 
news:9kc44avnl37k$.ltomwtank1j2.dlg@40tude.net...
> On Wed, 24 Oct 2007 13:55:10 -0400, Michael Kintner wrote:
>
>> I am trying to set a field so it does not get printed in a report when it
>> opens.
>>
>> I used to OpenARG statement and it passes the variable fine.  However 
>> when
>> trying to turn the field visiblity to false I get an error.  Strange?????
>>
>> Can you change report fields visibility so certain fields do not get 
>> printed
>> on the fly like this?
>>
>> I tried this with no luck.
>>
>> Private Sub Report_Open(Cancel As Integer)
>>
>>     If Not IsNull(Me.OpenArgs) Then
>>         InputArgs = Me.OpenArgs
>>         Select Case InputArgs
>>             Case "NoValues"
>>                 txtUM_QTY.Report.Visible = False  '<<< Fails here and 
>> don't
>> knwo why????
>>             Case Else
>>         End Select
>>     End If
>>
>> End Sub
>>
>> Thank you in advance,
>> Mike
>
> What is this line?
> txtUM_QTY.Report.Visible
>
> Is [txtUM_QTY] the name of a control? If so, what is .Report?
> You wish to make the control not visible if the OpenArgs = "NoValues"?
>
> Private Sub Report_Open(Cancel As Integer)
>     If Not IsNull(Me.OpenArgs) Then
>     Me![txtUM_QTY]. Visible = Not Me.OpenArgs = "NoValues"
>     End If
> End Sub
> -- 
> Fred
> Please respond only to this newsgroup.
> I do not reply to personal e-mail 


0
Michael
10/25/2007 2:49:00 PM
Reply:

Similar Artilces:

Print user class report in delimited form
Hi, I would like to export the user access report in delimted format to be used in excel, is there a way I can do it? The user class report has way too much headers and sub headers. Thanks in advanced. Sure, Just modify the report using Report Writer. Remove the page header section and also any extra lines you don't want in the report header. It's a pretty simple report. "Richard" wrote: > Hi, > > I would like to export the user access report in delimted format to be used > in excel, is there a way I can do it? The user class report has way too much ...

Setting Up Discover Card Account
I'm trying to figure out how to set up my Discover Card account to download monthly statements. I've been able to do this with every other credit card but not this one. Does someone have a simple step by step process? Do I have to enter the credit card account number? In microsoft.public.money, Mark B wrote: >I'm trying to figure out how to set up my Discover Card account to download >monthly statements. I've been able to do this with every other credit card >but not this one. Does someone have a simple step by step process? I forget; it's been a while....

Money Can't Set up a Mortgage Right!
I have issues with Money 2003. I bought a house Nov 2003. I set up the mortgage account and tell it my purchase date. It starts the loan 1/1/2004 because it assumes I have paid Nov interest at closing and won't owe anything until 1/1/2004. This screws up my net worth reports because I had a home asset in Nov 03, but the loan liability doesn't appear until Jan 04. Broken! I can't seem to set the loan date to force it to recognize the Nov loan beginning date. What to do?? Thanks, Ben Money starts the loan in 1/1/2004 because that's the date you told it the first payment...

field no show
The following query does not show the ID field. This is imperative because data change is dependent upon this field showing. select member_time.id, member_time.date, member_time.timein, member_time.timeout from member_time where member_time.date = #4/16/2010# This is written in a access database. Thanks That's strange. Maybe it's hidden? Try this: SELECT member_time.id, member_time.date, member_time.timein, member_time.timeout, member_time.id as TheID FROM member_time WHERE member_time.date = #4/16/2010# ; If that doesn't work, try this: SELEC...

Simple wildcard parameter on report control
I have searched the database but cannot find a solution to this problem. I have written a text box control on an access report as follows: =IIf([CaseNo] Like "A-*", DCount("[CaseNo]","QuarterlyCompilationStart","[Determ]='AR Prelim'"),"None") Some of our cases begin with *A-* and others with *C-*. This expression results in all the 'AR Prelim' records are counted regardless of what they begin with. I've also tried: =IIf("[CaseNo] ='A-*'",DCount("[CaseNo]","QuarterlyCompilationStar...

Calculated field in pivot table #4
I'm running Excel 2002. I'm unable to create a calculated field in a pivot table. I right-clicked on a cell in the table but I don't get the "Insert Calculated Field" window on my drop-down list. Do I need an Add-On? Am I doing something wrong? Thanks for any help. On the PivotTable toolbar, choose PivotTable>Formulas>Calculated Field Dan wrote: > I'm running Excel 2002. I'm unable to create a calculated field in a pivot > table. I right-clicked on a cell in the table but I don't get the "Insert > Calculated Field" window on my ...

Problems with re-setting the last active cell in an Excel workshee
I am trying to re-set the last active cell on an Excel 2002 worksheet (in this particular sheet it should be cell DA197). I have used both the methods described in the Knowledge Base article (deleting rows and columns and re-saving; and the Excess Format Cleaner add-in). Deleting the rows and columns does not work; using the Excess Format Cleaner does not work either and it then also hides the rows from 198 to 65536 - but does not do the same for the columns. I have checked that there is no protection on the worksheet. Has anyone else come across this problem and if so can you please ...

outlook won't automatically receive/send when opened
outlook won't automatically receive/send when opened how do i get it to do this? An answer would require knowing your Outlook version, mail account type, and connection type. -- Russ Valentine [MVP-Outlook] "newbiejw" <newbiejw@discussions.microsoft.com> wrote in message news:EDBE10B5-2D8E-4684-99A8-C8C0F4FDC25F@microsoft.com... > outlook won't automatically receive/send when opened > how do i get it to do this? ...

Complex (for me) checking values in fields to perform calcs in others
Hi all.. I am creating a Cash Flow Projection report in access that inspects the "completed dates" of sheduled draws to calculate a remaining balance, but I am having problems with it. The idea is: --------------------- Iff [Draw1CompletedDate] = Null then Me!txtBalance = [MortgageAmount] Else If [Draw1CompletedDate] <> Null AND [Draw2CompletedDate] = Null then Me!txtBalance = [MortgageAmount] - [Draw1Amount] Else If [Draw1CompletedDate] <> Null AND [Draw2CompletedDate] <> Null AND [Draw3CompletedDate] = Null then Me!txtBalance = [MortgageAmount] - [Draw1Amoun...

Cannot open PDF in OWA
Users can't open PDF or other attachments when using OWA. Is this by design or am I missing something in administering our SBS 2003 server? Hi, Is this the errors you experience? http://support.microsoft.com/kb/812935/en-us Leif "jeckert" <jeckert@discussions.microsoft.com> wrote in message news:FBD8ED6D-233F-4F85-8048-B73427FE711E@microsoft.com... > Users can't open PDF or other attachments when using OWA. Is this by > design > or am I missing something in administering our SBS 2003 server? Leif, No error is given. IE reports that the page is done...

Money Budget Reports
I am testing out Money Essentials and have a few questions (note: the help tool is pretty weak compared to other MS products). 1. Monthly budget tracker is cool, but how do you add items for which you paid a few days before the current month started. For example, I pay my Mortgage a few days before the first of the month - but I want it to show up in the budget tracker for April. 2. How do I offset large onetime payments out of the consolidated pie "spending categories"? For example, I paid off a credit card last month and it shows Credit Card Payments/Transfers as a hug...

How to join date/time field when "days" are same but "time" differ
Good evening everyone, I have one TRANSACTION table that contains: 1."date/time" field (YYMMDD hh:mm:ss) 2."quantity field" And another PRICE table that contans: 1."date/time" field (YYMMDD hh:mm:ss) 2."price field" Now, I want to join the "date/time" fields so I can perform a simple "quantity * price" calculation on each transaction-row. But the time differes (hh:mm:ss) and I just can't find a way to make Access accept a relation between the days (it outputs nothing). How can I make it ignore difference in the "ti...

Set the line weight with VBA in Excel 07
I applied a chart style to a chart. I had the macro recorder on while I manipulated the chart. I saw the code to change the default size of the marker, but I could not get any code to appear for adjusting the line weight of the data series while a chart style is applied. I looked in the series object model and don't see a property by which to set the line weight. The old Border property in 03 is gone. How should I adjust this programatically? Thanks. TL Hi, Try, activechart.SeriesCollection(1).format.line.weight=3 Cheers Andy TroyLee wrote: > I applied a chart style to a c...

Problem With Opening Attachments
For some reason, when I click on any attachment in received e-mails Microsoft Publisher opens and the attachments cannot be viewed. Does anybody know how to prevent this? It started just a couple of days ago and I haven't been able to find a solution anywhere. Thanks in advance. ...

How to set right margin in the Endnotes in Word?
I need to set the right margin in the endnotes in Word 2007. If you want the notes to have a different margin from the page, you can apply an indent (positive or negative) to the Endnote Text style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Ounbbl" <Ounbbl@discussions.microsoft.com> wrote in message news:826849B3-FED1-411D-906E-489FB29F1A00@microsoft.com... >I need to set the right margin in the endnotes in Word 2007. > ...

Is 2003 and open relay by default?
I have recently sent up an exchange 2003 server in our company. It was a fresh install on a 2003 server which is also a fresh install. Is 2003 Exchange an open relay by default? If so, how can I close it? no. by default it is closed to relaying "eotrue" <anonymous@discussions.microsoft.com> wrote in message news:0d5b01c3d949$36fe2090$a001280a@phx.gbl... > I have recently sent up an exchange 2003 server in our > company. It was a fresh install on a 2003 server which is > also a fresh install. > > Is 2003 Exchange an open relay by default? If so, how can &g...

Exporting e-mail account settings
I want to transfer all my account settings to another computer, also running Outlook 2003. How do I do this? Many thanks Tony Not sure what operating system you are using, but I tend to using Windows XP's Files and Setting Transfer Wizard and Microsoft Office's 2003 Save My Settings Wizard to transfer settings from one system to the next. Another possibility is the user state migration tool. http://www.microsoft.com/downloads/details.aspx?FamilyId=4AF2D2C9-F16C-4C52-A203-8DAF944DD555&displaylang=en "Tony Rush" <NOtony_w_rushSPAM@btopenworld.com> wrote i...

Excel sheet (OLE object) sometimes open on the form sometimes in E
Hello there, I have an Excel sheet (OLE object in the table) on a form , I have setup the Property in "Auto Activate" as Double-Click , so when I double click the object the sheet open. But sometime the object appears on the form as an Excel Icon - then when I double click it open in Excel - that is what I want. But sometime it appears as a table of data and when I double click it open on the form - I want to avoid that and instead always have the sheet open in excel. Any idea? Many many thanks, Dan Hi Dan, By default, you can directly double click the OLE Ob...

Outlook 2003-Failing remember name when typing into the To: field
I just got Outlook 2002 and I was informed that when you send a message and typing in the To: field that if you have emailed someone before it would remember the name. For example: If I send an email to Shawn Hedrick the next time I send one I would only have to type maybe the first few letter and then it would prefill the rest. Does anyone know about this or how to set this up? tools, options, email options, advanced options - is suggest names checked? -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStar...

Need help with Access report
I designed an access report with a facility and a buch of contacts for that. I created a group on the facility ID. I want only a certain type of contact to show up in the facility group header and rest of the contact types in the details sectio. Before some takes a wag at answering this, could you provide a little better description? Individual contacts normally would display in the detail section, not "in the facility group header". Maybe you should type in some significant records/fields and how and why they should display in your report. -- Duane Hookom Microsoft Access M...

Data Validation date field
I don't understand why this isn't working. I just want to make sure that they don't put a future date in the polydate field. Is me.polydate > now() an invalid expression? code: _________________________________________________________ Private Sub Form_BeforeInsert(Cancel As Integer) If Me.PolyDate > Now() Then Cancel = True Me.PolyDate.SetFocus MsgBox "Please enter a date that falls prior to today's date" Exit Sub End If End Sub It does not appear to be invalid. It is always helpful to post the error you are getting and if it is a runti...

Adding Array Fields on forms
How to use Modifier to add an array fields of 3 elements on a form? thks in advance. Hi HFLO, Open modifier and select gp or 3rd party and then select exisiting modified form or select new form and then open window layout. From the Toolbox slect local fields in drop-down and press the new button and then enter field name and enter the array size for e.g. 3 and then select the datatype string or text and press OK button. Toolbox will show the newly created the array field, select that arrayfield and drag and dropped onto the layout 3 times. Hence ur array field would be there on ur for...

How to open saved .DBX files?
I saved a folder of e-mails to CD from Outlook Express shortly before my last computer died. I desperately need to open the folder (saved as a .dbx file) by tomorrow, to get my husband (in Portugal watching the footie) the details of his hotel!!I am now running Xp and have both outlook and outlook express(office 2003) I tried open with, but selecting OE takes you into the OE files rather than selecting it as a prog.If I try open with outlook, it just appears as a folder attachment in an e-mail Can anybody help me open this wretched thing??? Ask in an Outlook Express forum. This is an...

page settings in Business Portal
We have a customer who wants to print the time sheet in landscape (page orientation); currently there are two ways of achieving it: 1. Change the printer settings (Control Panel > Printers and Faxes > Select printer; right click and choose properties > Printing preferences of General Tab > Advance tab). This would set the printer to the desired page orientation size; however, all documents that will be printed on the said printer will use the settings made. 2. On the Business Portal page go to File > Page Setup; choose the page orientation and size desired. The effect ...

Opening page
How do I configure Outlook so that when it opens it displays immediately the weekly calendar? Thank you 'Tools|Options|Other|Advanced Options', set "Startup in this folder" to be "Calendar" Hal -- Hal Hostetler, CPBE -- hhh@kvoa.com Senior Engineer/MIS -- MS MVP-Print/Imaging -- WA7BGX http://www.kvoa.com -- "When News breaks, we fix it!" KVOA Television, Tucson, AZ. NBC Channel 4 Still Cadillacin' - www.badnewsbluesband.com "Jorge Bravo" <open@closed.com> wrote in message news:egO6toXKJHA.5904@TK2MSFTNGP02.phx.gbl... >...