Show Hide Textbox/label

What's wrong with this code? Access 2007
I want the label to be invisible also if the value of the text box is null.


Private Sub Report_Load()
Dim strRpt As String

If Me.ReadingList.Value Is Null Then

    Me.ReadingList.Visible = False
    Else
    
    Me.ReadingList.Visible = True

    End If
    
0
Utf
9/27/2007 9:31:18 PM
access.reports 4434 articles. 0 followers. Follow

1 Replies
2205 Views

Similar Articles

[PageSpeed] 51

Donna wrote:

>What's wrong with this code? Access 2007
>I want the label to be invisible also if the value of the text box is null.
>
>
>Private Sub Report_Load()
>Dim strRpt As String
>
>If Me.ReadingList.Value Is Null Then
>
>    Me.ReadingList.Visible = False
>    Else
>    
>    Me.ReadingList.Visible = True
>
>    End If


Is Null is an SQL operator, it isn't available in VBA.  Use
the IsNull function instead.  This one line should do what
you want:

	Me.ReadingList.Visible = Not IsNull(Me.ReadingList)

-- 
Marsh
MVP [MS Access]
0
Marshall
9/27/2007 10:34:43 PM
Reply:

Similar Artilces:

How do I hide the names of Addressees in a sent note? ?
I wish to hide the names of the addressees from others when a send a note out to a broad audience Put them in the bcc field. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Mark Clemens" <Mark Clemens@discussions.microsoft.com> wrote in message news:DF1B74E4-C3B2-4DB1-94A1-1829E00F13A5@microsoft.com... >I wish to hide the names of the addressees from others when a send a note >out > to a broad audience > And if you don't see the bcc field in your email header area, you'll nee...

Value Y axis label is cut off
I can't figure out how to increase the "text box" around the Y axis label. In the display, it shows the entire word, but in the actual chart, the last letter of the word is cut off. It appears that I can only move the position of the entire label, but I'm not able to stretch the label so that it includes the entire text. I tried putting a couple spaces after the text in the Title field in the Chart Options screen, but this didn't help. Example: The Y axis label is "Annual Return" and it looks like it says "Annual Returr" due to the "n" b...

Dialog is not showing
My SDI app runs a COM object that can open multiple windows. If this COM object opens just one window I can click on a button on my app to open a modal dialog which works. If the COM object opens two or more windows when I click on the button to open the modal dialog it does not appear and my app no longer responds to input. When I close one of the windows of the COM object (there can still be multiple windows opened by the COM object) the dialog appears and my app now responds to input. Any ideas on how I might troubleshoot this problem? The COM object is started and controlled by a hidd...

New distribution groups not showing in GAL
I'm creating two distribution groups on Exchange 2003. I simply right-click the OU and create a new group, global distribution group selected via the radio buttons. Next screen I check the box to add an Exchange email address and leave the defaults. Next and Finish. Open Outlook and no entries in the GAL. I waited 24 hours for the GAL to update and looked again. Still not finding my new distribution groups! If I put the alias in the "To:" box and send I get error 5.1.1 that the account wasn't found in the domain. What am I doing wrong? Any help greatly appreciated! Dyl...

Outlook 2003 lost show new mail alert
In Outlook 2003 I have lost the show new mail alert facility although it is ticked. I see the Outlook yellow square in my taskbar instead of the envelope. How can I fix this? Beemer Beemer <Beemer@nowhere.com> wrote: > In Outlook 2003 I have lost the show new mail alert facility although > it is ticked. I see the Outlook yellow square in my taskbar instead > of the envelope. Is it a matter of you using Windows XP and that XP is hiding the new mail icon? You can check this by right-clicking the Taskbar Notification Area and chooing Customize Notifications. Look for...

"Show Placeholder" feature in options/view doesnt work
I have a macro that places a large number of pictures on a spreadsheet. I would like the pictures to show as "placeholders" to speed up viewing/editing. The only problem is that this feature (under Tools/Options/View) does not work. All the images are being display normally. I have tried this in Excel 2000/2003/XP with the same result. This feature works great in MS Word. Please help. To see what I'm talking about. Go to Tools/Options/View and check the "Show Placeholders" option. Now insert a picture or clipart. The image will be displayed normally instead of just a b...

Colored cells are showing white on screen, want to see color?
I have sheet cells that I know are colored, but they show white on my system, and print grayscale, while showing their true colors on other office systems.... Does this article help http://support.microsoft.com/d��efault.aspx?kbid=320531 Changes to fill color and fill pattern are not displayed in Office programs -- HTH Bob Phillips "dean" <dean@discussions.microsoft.com> wrote in message news:B1990525-1D7B-4E94-9653-80074F9AAEFD@microsoft.com... > I have sheet cells that I know are colored, but they show white on my system, > and print grayscale, while showing ...

Index watches aren't showing in portfolio?
I have three indexes in an investment watch account: Index - Dow Index - NASDAQ Index - S&P 500 Thea above are always at 0.00. I do have other indexes, which update. Why are the above not updating? Thanks, Brett I have this same problem since I upgraded to 2004. All other prices update fine - just these three that won't work. Anybody got a fix for this? "Brett" wrote: > I have three indexes in an investment watch account: > Index - Dow > Index - NASDAQ > Index - S&P 500 > > Thea above are always at 0.00. I do have other indexes, which upd...

Hiding Columns In Excel
When I try to hide too many columns in Excell I get the following message and it won't let me hide the columns, "Cannot Shift Objects off Sheet.". Is there a workaround? What am I doing wrong? The following MSKB article may help: XL: "Cannot Shift Objects Off Sheet" Error Hiding Columns http://support.microsoft.com/default.aspx?id=211769 Also, Dave Peterson recently posted this advice: '================ Someone with the same problem posted back that their comments were getting resized causing the trouble. Maybe enabling: Tools|Options|View|Comment and ...

hiding columns
Hi, I have a report that has 17 fields. Therefore, it has two pages when I print it off. Is there a way that I can squeeze the 17 fields in one page report? --------------- In Excel, we can hide or show columns when we need them or not. Can I hide/show the fields on report? Thanks Chi Reports in Access are based on queries (ideally), or on tables. If your report is based on a table with 17 fields, you are still not required to include all the fields/controls on your report. A preferable approach would be to create a query that only returns the fields/columns of data you need in you...

hiding rows #3
I want to find a quick way to hide various rows in a spreadsheet that contain zero values. i.e. below example i want to hide the whole row 'oranges' sales apples 100 pears 200 oranges 0 bananas 30 I have quite a lot of rows that may need hiding and any help would be appreciated, thanks. data>filter>autofilter -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett1@austin.rr.com "karl middleton" <karl middleton@discussions.microsoft.com> wrote in message news:64150DD9-6E0D-460D-8D75-21117ED6C23F@microsoft.com... >I w...

Make Userform Caption equal textbox contents
How does one make a Userform title bar caption Equal the contents of Textbox1? Can anyone help? Thanks, Roger You can try Private Sub TextBox1_Change() UserForm1.Caption = TextBox1.Text End Sub or you can use Textbox1_Exit event... -- Jacob "Roger on Excel" wrote: > How does one make a Userform title bar caption Equal the contents of Textbox1? > > Can anyone help? > > Thanks, > > Roger Thanks Jacob - works nicely Roger "Jacob Skaria" wrote: > You can try > > Private Sub TextBox1_Change() ...

Hiding zero values
I have a chart with data in Columns C and E. I want the columns to zero out when subtracted (ex:=E2-C2). My issue is I only want zeros in the answer column G to display in the rows with data, not in the rest of the column where I put the formula. Is that possible? Any ideas would be helpful. I can't hide zero values becuase then nothing in the column would display at all. I tried an If Statement but I get a circular reasoning error. HELP! Submitted via EggHeadCafe - Software Developer Portal of Choice A C# WaveOut API Player - Recorder Library http://www.eggheadcafe.com/tutorials/...

Hide worksheets if macros are disable
Hi, what I was hoping to do is if the marcros are disable when the file is opened all the worksheets are hidden except one with a message saying to enable macros in which case this sheet would be hidden if the macros were enable. TIA If macros are disabled, there's nothing you can do to change they way it opens. Maybe you can save the file with the worksheets hidden the way you want. Then have your auto_open/workbook_open unhide the ones you want to see. Eintsein_mc2 wrote: > > Hi, what I was hoping to do is if the marcros are disable when the file > is opened all the work...

Possible to hide a sub-report if NULL values?
Hi, I have created a report (column) that list open invoices and I have also attached a sub-report (different table) that displayes comments. Problem: sub-report is showing for all invoices, but I would like it to show ONLY for invoices that has a comment. That is, invoices that has no comments only list their usual values, and invoices with comments I have a sub-report displaying the comment. Is that possible? (otherwise my invoice-list with contain a lot of unecessary space - used by the sub-report). Kindly, Mikael Mikael Lindqvist wrote: >I have created a report (column) that l...

hiding columns, error message says cannot shift objects off sheet
Hiding columns on a spreadsheet ( which we do frequently). Error message says: 'cannot shift objects off spreadsheet'. WHat does this mean and how do I work around it? Thanks! hi, excel thinks that there is data in column IV. excel by default cannot shift data off the sheet ie beyound column IV or below row 65536. solution. highlight all the column to the right of your data and hit the delete key. that should fix it. >-----Original Message----- >Hiding columns on a spreadsheet ( which we do frequently). Error message >says: 'cannot shift objects off spreadsheet&...

Start label in middle of page
Hi Using labels for a laser printer I would like to instruct the report to start printing on a spesific row.. Reason, sometime you only print one or two rows. The next time that you print labels you must be able to instruct it on which row to start printing. Can it be done? Thanks Alfred On my website (www.rogersaccesslibrary.com), is a small Access database sample called "MultipleLabelsOffset.mdb" which illustrates one way to do this. -- --Roger Carlson MS Access MVP Access Database Samples: www.rogersaccesslibrary.com Want answers to your Access questions in your Ema...

StyleRef Field in Headers to Show Chapters/Sections
New to fields...I want my headers to show chapters on the even page and sections in the odd pages. When I put a simple StyleRef field in I'm not getting what I want...here is what I would like it to do: - if a chapter has not started yet (as in the preface pages) then I would like it to be blank rather than picking up the chapter that will be 10 pages later. - same with the section I guess I'd like both to search starting from the bottom of the page the field is currently on...and go backwards through the document to the most recently started chapter/section. I'm s...

Activity Roll up
Hi, I was just wondering if the activity roll up within an account includes activities created in custom entities which are related to that account? If not, any ideas on how to do this? Help please.... :( Activity rollup in V3.0 does not support rolling up from custom entities. Thanks for your suggestion. We will consider this feature for a future release. An Issue has been entered into our tracking data base. -- This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use. © 2005 Microsoft Corporation. All rights reserve...

URLs dragged into tasks shows up as Icons, can I have links instead?
I often need to put webaddresses in the tekst in tasks. I would like to drag them from the addressbar in IE into the textwindow of a task like I do in other programs like Word (where I get the address as a clickable link) or FrontPage (where I get the Title as a clickable link). However, in Outlook I get just the IE-page icon and the first part of the URL. Mostly useless. Is there a way to change this to the Word or preferably the Forntpage way of showing the link? ...

Pivot Tables: New dimension members show up checked in dropdown
I've noticed that when distinct new members are added to dimension dat they show up as checked in a dropdown list when the pivot table i refreshed. Is there anyway to disable this so that they don't show up (pre checked? Basically, I have a model that depends on a subset of the members which I have checked in a dropdown, and the rest are unchecked - an when a distinct new member is added it automatically shows up a checked in the dropdown list, which gives me wrong answers. E.g. I have Stock Tickers as a dimension and avg. price as the measure I have 10,000 Distinct Tickers of whic...

Y-axis label Bug
Has it been reported and is a solution being found to the problem with Y-axis labels in Excel 2003? When ever a y label is used the end portion is cut off and not displayed on screen. It will print ok from excel but not if the figure is copied or inserted into word. The last I knew, it hadn't been fixed. The "fix" (and I use that term loosely) is to put in several ... at the end of the Y axis label and then format ... so that it's the same color as the background. I had to update something like 50 charts when I first discovered I had the problem. I'll be gl...

Autofilter shows no results, but there should be because there are matches
the column that I am trying to use autofilter on has nothing but numbers in it. But when I do a custom filter for a number that begins with '5' (for example), it shows no results. Even though there are plenty of numbers that start with '5'. I do the same excercise on another worksheet that is formatted the same, and it works fine. If I go back to the non-working worksheet and retype the number in each cell the autofilter will work. WHY OH WHY is this so? That happened to me whenever I imported data from a particular database. On import, somehow a little 1/2 space was put i...

Hide the Gridline for a cell in CListCtrl ??
Hi: I have a CListCtrl with gridlines turned on. Just wonder, is there a way to remove or hide the grid line for a particular cell? Thanks Polaris ...

Hided values appears when I'm copying/pasting it to other worksheet
So, in one worksheet I have some data and there is some colums hided. When I selecting all that data and pasting to other worksheet, al these hided colums or rows values appears and I have to hide it again. Is there possibility to copy/paste in such way, that these hided value don't appear again? Thanks in advance Best Regards, Aivara -- Aivaras_Bakana ----------------------------------------------------------------------- Aivaras_Bakanas's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2518 View this thread: http://www.excelforum.com/showthread.php?threa...