How to hide a text field label when the field is null? Access2003

In MS Access 2003 report, how to hide the label attached to a text field when 
the text field is blank? Example: Field Name = [MiddleName]; the label for 
[MiddleName] is [MidNameLbl]. If no middle name, I do not want the label to 
appear. Thanks
0
Utf
1/23/2010 3:13:01 PM
access.reports 4434 articles. 0 followers. Follow

2 Replies
1632 Views

Similar Articles

[PageSpeed] 26

The no-code method is to change the label to a text box and set its properties:
  Control Source: ="Mid. Name:           " + [MiddleName]
  Can Grow: No
  Can Shrink: Yes
If MiddleName is null, the text box will disappear.
-- 
Duane Hookom
Microsoft Access MVP


"Pearl" wrote:

> In MS Access 2003 report, how to hide the label attached to a text field when 
> the text field is blank? Example: Field Name = [MiddleName]; the label for 
> [MiddleName] is [MidNameLbl]. If no middle name, I do not want the label to 
> appear. Thanks
0
Utf
1/23/2010 10:01:01 PM
The code version would be to add some code to the Format event of whatever 
section (probably the details) the control is located in.  Something like:

Private Sub Details_Format

    me.MidNameLbl.visible = LEN([MiddleName] & "") = 0

End Sub

The reason I used the expression on the right side of the equal sign is that 
the field could also be a zero length string.

HTH
Dale

"Pearl" <Pearl@discussions.microsoft.com> wrote in message 
news:42DED1AA-0D24-4B24-BFE5-249D81C886C7@microsoft.com...
> In MS Access 2003 report, how to hide the label attached to a text field 
> when
> the text field is blank? Example: Field Name = [MiddleName]; the label for
> [MiddleName] is [MidNameLbl]. If no middle name, I do not want the label 
> to
> appear. Thanks 


0
Dale
1/24/2010 1:31:02 PM
Reply:

Similar Artilces:

Using custom fields for better email list view.
Hello. I get lots of letters with the same title. I want to group them by topic and sort on the number of letters in the group. I know that I can do this using custom fields but I do not know what query to use to get the number of letters the group. ...

Hiding "0" values in pivot table
In a worksheet I have a listing of stock records with ItemNumber, Date, StockLocation and NumberOnStock. When I make simple Pivot Table with ItemNumber and StockLocation as rows and select a Sum of "NumberOnStock" I would like to hide rows where the sum is "0". But this does not seem to be possible. Tried to follow the guidelines in the Microsoft article: http://office.microsoft.com/en-us/assistance/HP051998791033.aspx#Hide%20zero%20values%20in%20a%20PivotTable%20report But no luck :-( Mogens You could use conditional formatting on these cells - highlight the cells,...

Hiding formuals in cells question
Hi. I was wondering if there was a way to hide the formulas in cells without protecting the sheet. I am making something for other teachers at my school and I want to hide the formulas so they won't mess anything up on the spreadsheet. Any help would be greatly appreciated. Thanks! Hi not without protecting the sheet but why is this a problem for you? -- Regards Frank Kabel Frankfurt, Germany "JP" <JP@discussions.microsoft.com> schrieb im Newsbeitrag news:ABFE07BF-6087-4E24-814A-03AF8863A633@microsoft.com... > Hi. I was wondering if there was a way to hide the fo...

From Field
Hi All, Am encountering strange issue: anyone can send e-mail in any other name, just he has to put in the "from" field the name of any sender he wants and then the e-mail is sent in that name. Please let me know if there is any remedy. I have Exchange 2003 enterprise edition. Regards E2k out of the box doesn't allow this, so it sounds like someone may have mistakenly added users to a group they shouldn't belong to, or has granted service-level permissions in Exchange to a group that shouldn't be in there. First, find out what groups these users belong to. See wh...

how do i use an if is null, and if is not null statement together
I have to compare two columns of data, and show the status in column three. Column1 = enrolleddate, Column 2= DisenrolledDate, Column 3 = Status If column1 and column2 are null, "Active", if column2 is not null, then disenrolleddate Thanks for helping me. If you were using a spreadsheet, you might need that third column. In Access you can simply use a query to do the comparison and generate the "calculated" value. Regards Jeff Boyce Microsoft Office/Access MVP "latha" <latha@discussions.microsoft.com> wrote in message news:A4366DA3-9E0E-48C8-BB30-452...

hide my name
When replying to an email or creating one from scratch how do i hide my name in the "from" field...thx fred <fdbjrgetridofthis@wowway.com> wrote: > When replying to an email or creating one from scratch how do i hide > my name in the "from" field...thx Are you saying you want the reply to be anonymous? -- Brian Tillman [MVP-Outlook] no, I don't mind if my email is revealed.. just my name. I have tried by removing it from the "User Name:" field in the email account but it continues to show up. I have also removed from the header informati...

Title & Text Layout Format Issues
I believe this has been answered before but cannot locate. (probably Echo) On a Title & Text Layout slide I manually reduced the font size so all text would fit. I saved the file but when re-opening it reverted back to the large size. The auto correct options are all turned off. THX! Fritz PPT 2003. I think you've run into a bug, Fritz. The info at this link offers some workarounds: Text size or other formatting is lost when you save, close, and reopen a presentation http://www.pptfaq.com/FAQ00849.htm -- Echo [MS PPT MVP] http://www.echosvoice.com Wha...

Button Text not showing :Too many items in Oppurtunity Menubar
Hi, It is indeed necessary for me to display the Text for all the buttons. But, there exist a lot many and CRM is hiding the text. How can i tackle this? How can MenuITem be useful (if at all.)? Thanks. Submitted via EggHeadCafe - Software Developer Portal of Choice WPF Report Engine, Part 2 http://www.eggheadcafe.com/tutorials/aspnet/0ad2fa61-7f0c-485f-92c9-cf3a9ee210a7/wpf-report-engine-part-2.aspx You could try hiding toolbar buttons you don't need using JavaScript. This code will hide "Create Invoice" button on "Order" entity form. var mb = document.getEle...

White Text On Black
I've looked through my printer's settings (Epson) and haven't found anything helpful there. Is there a setting in Word 2004 that'll reverse the colors? No sense in running through all that black ink. Thanks. Dave I'm not sure exactly what you're asking, but my guess is that it's best answered by simply saying that there is no such thing as "white" ink - at least not at anything less than special spot color at the commercial printing level. White on the typical home/office printer simply means the absence of ink in those locations where it's called ...

Hiding and Un-Hiding Data fields
I am using a form for people to select data via dropdown menus and then having it run through a query to filter results. Is there a way that I can have certain feilds hidden until a toggle button or something of the like is clicked? Basically I want have three choices of buttons: Year, Quarter, and Month. What I ideally want to happen is when someone selects the button for year, a hidden drop down menu appears where they can then choose from the available years to filter through the query. I would say I am above average with using access, but I have no idea how to hide fields and then...

How do I hide gaps in an Excel 2007 chart?
I have a bar chart that is showing gaps and i don't want them. The select data > hidden and empty cell button does not give an option to hide gaps. I think by default they are hidden but if you even click on this to see what it does the gaps are shown and no way to turn off. Hi, If you hide the actual rows then with the Plot visible cells only setting on the gaps will be removed. In xl2007 the setting is on the Select Data dialog, Hidden/empty cells button. Cheers Andy Waynesch wrote: > I have a bar chart that is showing gaps and i don't want them. The s...

how to draw static text in a dialog
I creat a dilog and want to display some lines in the static text of the dialog . this is code: CWnd *pWnd = (CWnd*)GetDlgItem(IDC_mystatictext); CDC* pDC= CWnd::GetDC(); pDC->MoveTo(0, 0); pDC->LineTo(600, 400); but it just display in the dialog and cannot display in the static text! I just a newer one to study vc,thanks for yous help. You dont have to draw anything. Simply call SetWindowText on it: CWnd *pWnd = GetDlgItem(IDC_mystatictext); ASSERT_VALID(pWnd); pWnd->SetWindowText(_T("SomeText")); --- Ajay liuerbin2000@163.com wrote: > I creat a dilog and want t...

Inserted images and pasted text is the wrong color in publisher.
When I insert a picture (jpg) from file or scan it in, it places it as a green picture even though I scanned as a full color. Also copied black text, when pasted into publisheris pasted in green? Am I missing a default setting. Everything I try to insert or past is green. Have you looked to see if there is an updated video driver lately? -- JoAnn Paules MVP Microsoft [Publisher] ~~~~~ How to ask a question http://support.microsoft.com/KB/555375 "CaryK" <CaryK@discussions.microsoft.com> wrote in message news:4DB4633E-93FF-44DF-B237-0B2E6DC9D4DD@microsoft.com... >...

text wrap problem
Hi all I'm importing address info into Excel from our in-house database. Th addresses comes as a block with line breaks which show up as a squar in Excel (when text wrap is off). I need to change these marks int commas. Is there any way to do this automatically? I dont have VBA knowledge but suspect this is where the answer lies. Apologies if this is an innane question to some but Im stumped. Cheers Lo -- Message posted from http://www.ExcelForum.com From a previous post: Chip Pearson has a very nice addin that can help identify those funny characters. http://www.cpearson.c...

Field Chooser
The headings of some Outlook mail boxed got "mixed up" somehow. I no lomger have the To, Subject, SendDate columns. I hear that you can use Field Chooser to restore them, but I can't get it to work. Can anyone offer some help? Regards, Leo ...

Text is Truncated With String Variable
If I do this: Dim theTxt as String theTxt = Activesheet.Cells(1,1).Text for some reason the text (which is actually 1849 characters long) is truncated to 1024 characters. If I do this: Dim theTxt as Variant theTxt = Activesheet.Cells(1,1) I get the complete text string from the cell. Can someone tell me why these two approaches are giving me different results? Thanks, Eric One uses the .text property, the other uses the default property (.value). EricG wrote: > > If I do this: > > Dim theTxt as String > > theTxt = Activeshee...

Hiding a worksheet #3
I want to hide a worksheet. So, I went to the format menu and the "worksheet" option is grayed out. Why? And, how do I "ungray" it. Hi is your worksheet protected ? -- Regards Frank Kabel Frankfurt, Germany llong wrote: > I want to hide a worksheet. So, I went to the format menu and the > "worksheet" option is grayed out. Why? And, how do I "ungray" it. I think Frank meant to ask about the Workbook--not the worksheet. (Check under Tools|protection|Protect workbook or Unprotect workbook) My question is: Is there another sheet in the w...

No Text Shadow option
Using Excel 2002, Win XP. I have all the buttons on the Formatting toolbar showing, yet there is no Text Shadow option. Any suggestions will be appreciated. Thanks in advance. Stan Stan AFAIK there is not such feature for text only. You can use the Drawing Toolbar to place shadows behind Graphics, WordArt, Autoshapes and Text boxes. Gord Dibben Excel MVP On Tue, 23 Dec 2003 03:46:51 +0200, "Stan" <me@there> wrote: >Using Excel 2002, Win XP. >I have all the buttons on the Formatting toolbar showing, yet there is >no Text Shadow option. >Any suggestions will...

Hide images when Hiding Rows
I have inserted images into cells, but when I hide the column the images are not hidden with that column, they just get squished between the two cells next to the hidden cell. Is there a setting or way to tie the image to that cell so that it hides/unhides appropriately with the row? -- kurt ------------------------------------------------------------------------ kurt's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=35686 View this thread: http://www.excelforum.com/showthread.php?threadid=554712 Kurt You cannot insert an image into a cell. You can overlay ...

refrence field on a table
I am trying to have a button on a form where I push it and it opens the form matching a field in the original form. I am starting in "entry" form I click the button "addrun" it then opens the "run" form. on both forms I have a field [formationid] I am trying to have those fields match when I open the "run" form. I tried the following in the where condition of the open form macro. [Forms]![entry]![formation.formationid]=[Forms]![run]![formationid] On Sun, 3 Jun 2007 11:53:01 -0700, Fipp <Fipp@discussions.microsoft.com> wrote: >I am gettin...

only returning cells with Text in it
Hi, I have a column that returns some text, if something else is true. Now what I want to do is take only the cells in that column and list them on another sheet. The trick is, that ill need to do this with a frmula, since it will be a hosted template and the user wont be able to use excel functions like sort, etc. so, if I have 10 cells and 3 of them have test in them, I want to show only the text in those 3 cells in another sheet. I hope that makes sense.... Thanks for your help.... Assuming that Sheet1!A1:A10 contains your data, enter the following formula in Sheet2!A1 and copy do...

Label Ranges
Labels seem to work in formulas provided only that the option is turned on at Tools, Options. What is the purpose then of the Label Ranges dialog? Obviously it is for adding ranges thathave labels but what is achieved? ...

how to hide an ActiveX control?
hi there i have an ActiveX control, written in C++, which has the OLEMISC_INVISIBLEATRUNTIME flag set, yet when i display the web page it is attached to, i get the familiar "red cross" graphic in the middle of the screen - how can i hide the control so nothing is displayed at all? tia bhu can u set the size of ur control as 1x1 pixels "bhu Boue vidya" <bhuvidya@yahoo.com.au> wrote in message news:1175703214.292931.252210@e65g2000hsc.googlegroups.com... > > hi there > > i have an ActiveX control, written in C++, which has the > OLEMISC_INVISIBLEATR...

Hiding plot Area
I have a formatted output sheet that has a Pie Chart embedded. The data for the pie chart comes from a second sheet using 2 ranges B2:B6 & D2:D6 B2:B6 is always populated and contains labels. What I want to do is, when D2:D6 contains 0 in each cell (or Null), suppress the Pie chart but always show the Legend (which is driven by B2:B6) Many Thanks Adam Adam - All you see of the pie when all values are zero is a single line at the first slice. The legend still appears. To hide the line, double click on one of the wedges and on the Patterns tab, change the Border setting to None. ...

Hiding rows with VBA
Hi all, In my sheet called "insertsheet I have this VBA: (thanks to some users of Google groups) Private Sub Worksheet_Change(ByVal Target As Range) Const nMAX As Long = 10 Dim nRows As Long Application.ScreenUpdating = False With Me With .Range("B8") If Intersect(Target(1), .Cells) Is Nothing Then Exit Sub nRows = .Value End With .Range(.Cells(1, 5), .Cells(1, _ .Columns.Count)).EntireColumn.Hidden = True .Range(Cells(1, 5), .Cells(1, _ ...