visible label based on text value

I am using a database on a LAN and I have the following in the on format event 
Me.ContactList.Visible = Not IsNull(Me.ContactList) 
However when one user opens the data base the label is hidden if the 
condition is true but if another user on the LAN subsequently accesses the 
data base all the labels are displayed 
any suggestions
-- 
thanks as always for the help
 jer
0
Utf
3/27/2010 5:29:02 PM
access.reports 4434 articles. 0 followers. Follow

3 Replies
2131 Views

Similar Articles

[PageSpeed] 34

jer wrote:

>I am using a database on a LAN and I have the following in the on format event 
>Me.ContactList.Visible = Not IsNull(Me.ContactList) 
>However when one user opens the data base the label is hidden if the 
>condition is true but if another user on the LAN subsequently accesses the 
>data base all the labels are displayed 


The only thing I can think of is to verify that the control
value is really Null.  Maybe it's a zero length string? or
maybe it's one or more spaces.

If that's what's happening, you should think about why you
set the table field's AllowZeroLength property to Yes.  If
it were set to No, it would be Null instead.

If you can not prevent the field from containing a ZLS, try
checking for both Null and ZLS:

Me.ContactList.Visible = (Len(Nz(Me.ContactList, "")) > 0)

If the value somehow got set to one or more spaces, then use
the Trim function to get rid of them:

Me.ContactList.Visible = (Len(Trin(Nz(Me.ContactList, "")))
> 0)

-- 
Marsh
MVP [MS Access]
0
Marshall
3/27/2010 6:14:32 PM
Thank you Marshall for the quick response.  On closer review I am noticing 
something else which is not consistent  I supplied one of a number of labels 
which are in a group header. In order to format the report to fit on a letter 
size page, I have three rows of headers and 3 rows of details, e.g.,  
Header= Type

Type1
label1    label2       label3
label4                      label 6

detail1    detail2     detail3
detail4                   detail6

Type2
label1    label2       label3
              label5

detail1    detail2     detail3
               detail5

I notice that the labels are not always matching the details. e.g label 5 
for type2 is not visible even though there are details under this header
any other suggestions





-- 
thanks as always for the help
 jer

"Marshall Barton" wrote:

> jer wrote:
> 
> >I am using a database on a LAN and I have the following in the on format event 
> >Me.ContactList.Visible = Not IsNull(Me.ContactList) 
> >However when one user opens the data base the label is hidden if the 
> >condition is true but if another user on the LAN subsequently accesses the 
> >data base all the labels are displayed 
> 
> 
> The only thing I can think of is to verify that the control
> value is really Null.  Maybe it's a zero length string? or
> maybe it's one or more spaces.
> 
> If that's what's happening, you should think about why you
> set the table field's AllowZeroLength property to Yes.  If
> it were set to No, it would be Null instead.
> 
> If you can not prevent the field from containing a ZLS, try
> checking for both Null and ZLS:
> 
> Me.ContactList.Visible = (Len(Nz(Me.ContactList, "")) > 0)
> 
> If the value somehow got set to one or more spaces, then use
> the Trim function to get rid of them:
> 
> Me.ContactList.Visible = (Len(Trin(Nz(Me.ContactList, "")))
> > 0)
> 
> -- 
> Marsh
> MVP [MS Access]
> .
> 
0
Utf
3/27/2010 8:42:01 PM
jer wrote:
>Thank you Marshall for the quick response.  On closer review I am noticing 
>something else which is not consistent  I supplied one of a number of labels 
>which are in a group header. In order to format the report to fit on a letter 
>size page, I have three rows of headers and 3 rows of details, e.g.,  
>Header= Type
>
>Type1
>label1    label2       label3
>label4                      label 6
>
>detail1    detail2     detail3
>detail4                   detail6
>
>Type2
>label1    label2       label3
>              label5
>
>detail1    detail2     detail3
>               detail5
>
>I notice that the labels are not always matching the details. e.g label 5 
>for type2 is not visible even though there are details under this header
>any other suggestions


I'd be willing to bet that what you are seeing is
consistent.  It's just not meeting your expectations and we
have yet to figured out why.

OTOH, your statements in this post do seem incinsistent to
me.  You said you have 3 rows of headers and 3 rows of
details, but your example has two rows with 3 columns.  How
are you doing that?  Is the report set up to use 3 columns?
If it's not using 3 columns, how are the details arranged to
get 3 details per row?

Is it true that each type grouping only has one detail
record?

Did you verify that no record has a ZLS or spaces in the
field?

Aother stray thought.  Verify that your code is in the
detail section's Format event.

-- 
Marsh
MVP [MS Access]
-1
Marshall
3/27/2010 9:50:31 PM
Reply:

Similar Artilces:

check box value
Help. I am creating an order form for my customers. We have a standard product and then a few options. Rather than have my customers type the price of the options in (& risk holding up an order due to incorrect pricing), I want them to select a check box. When "red hats" are checked I want $1.00 to show up in AE20 and when "green hats" are checked I want $2.00 to show up in AE21. I guess I want a set value to populate a cell when a box is checked. right click on your check box and go to format control select ad20 and ad21 as your cell link,in ae20(and similar ...

Excel Automation problem
hello, I have a problem in my MFC class library (VS2003) w.r.t excel automation. I open an excel file to grab some data and close it. When the user clicks the button to open another excel file, the file that I previously used is show in an excel window that opens... (i NEVER want excel to be visible) My interface to the excel automation is implimented through a singleton object. I think that the focus of excel (even though the visible property is FALSE) is being propagated to the top when focus is lost on my app (focus going to the open dialog). Trying to set breakpoints i can se...

Hiding rows based on cell value
I have a spreadsheet with a column of dates. I need to write code to hide all rows that are outside of a range of dates that I input as a "start date" and "end date" via 2 input boxes. Suggestions? *** Sent via http://www.automationtools.com *** Add a newsgroup interface to your website today. One simple answer would be to use a 'helper' column at the end with a formula that looked at the dates and based on your criteria either returned an OK or HIDE. Then just do Autofilter on that column selecting OKs. The HIDE value would prompt you to redo the filter if dat...

excel to merge for labels in windows
I have been given a Excel spreadsheet and need to print labels with the information and i am new to excel. I am trying to get the ionfo to word,but the information doesn't not transfer over. Find a tutorial here: http://www.mvps.org/dmcritchie/excel/mailmerg.htm In article <227EEA8C-C116-4FEB-B660-9E8578673EF3@microsoft.com>, "water" <water@discussions.microsoft.com> wrote: > I have been given a Excel spreadsheet and need to print labels with the > information and i am new to excel. I am trying to get the ionfo to word,but > the information doe...

Visible by code
I have a form called sfrm_status_of_lif_notes. In this form there is a text box called status. This text box is bound to a previous form. In the Detail of the form I have a text box called approved_dt. I have the visibility set to No. I would like approved_dt only to be visible if the status is "Approved" I tried this in the On Open event of the form: Dim blnVisible As Boolean blnVisible = (Me.status = Approved) Me.approved_dt.Visible = blnVisible It did not work. Does anyone have any suggestions? -- Message posted via AccessMonster.com http://www.accessmonster.com/...

Creating A Total Based On Multiple Conditions
I'm working on a spreadsheet and my head has nearly exploded fro frustration. The problem is, i need the spreadsheet to count cells in one column bu only if they hold certain data from another cell. I found one sample formula which is: =sum(if((B5:B25="NORTHWIND")*(C5:C25="WESTERN"),F5:F25)) but it doesn't seem to work, i'm quite new to excel so maybe i jus don't understand it, so explaining what it means would be good. Erm...... does that make sense???? Can anyone help before i go totally insane? :confused -- Message posted from http://www.ExcelForu...

only visible if...
Hi All, I'm self-teaching on Access as I develop a client tracking database for my facility. I'm probably going to say this wrong, but here goes. I have a report where I only want to have a particular field (control?) visible if the data in the field it is boud to says a specific thing. The control is in the Detail section of the report, and it's called Discharge Reason" It refers to a field with the same name in the query the report is bound to. There are 8 possible entries for this field, plus "Contract Change" That's the only one I want to see in my repo...

Arabic text in Word
> Ce message est au format MIME. Comme votre programme de lecture de courriers ne comprend pas ce format, il se peut que tout ou une partie de ce message soit illisible. --B_3279965559_645741 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: 8bit Hello, I am using the French edition of Word 2004 for Mac (version 11.3.8) under Mac OS 10.4.11. When I paste Arabic text into a Word document, from TextEdit for instance, it exits unexpectedly. If I write directly into Word, the letters are not attached. Would you know how to solve this problem ? I reprodu...

Combining Text with Formula
Is is possible to have a cell contain text information and then a lookup to another cell. For instance: "The age of this person is " plus the result of another cell that calculates his age so that cell would read: "The age of this person is 72." Thanks for any help you can give me. DebraAnn DebraAnn, yes. =The age of this person is "&B1&"." where B1 holds the calculation. -- DDM "DDM's Microsoft Office Tips and Tricks" Visit us at www.ddmcomputing.com "DebraAnn" <anonymous@discussions.microsoft.com> wrote in...

Set number format based on cell contents
I have a cell B3 which shows a Data Validation list of £ or % Having selected £ or % in B3 the user then enters a number in C3. I want to have cell C3 formatted to General if B3 = % and formatted to Currency if B3 = £. I'd really appreciate some help Thanks You need VBA for that. Paste the following macro into the sheet module for the sheet you are working on. To do that, right-click on the sheet tab, select View Code, and paste this macro into that module. Note that this macro does exactly what you asked. That is, it will change the format of C3 if you select $...

Pop up
Hi, I have a pop up form from the main form to key some additional info in the same field that's on the screen in the main form. I have filtered it for the secondary form incident no to match the main form incident no - when I try to save the record in the pop up form I get an error - changes I requested would create duplicate value - can't save. Can anyone help? Thanks, Bonnie On Fri, 25 Jan 2008 08:43:02 -0800, Bonnie <Bonnie@discussions.microsoft.com> wrote: >Hi, > >I have a pop up form from the main form to key some additional info in the >same field...

>> Visible and not visible
Hi, using Access 2003. I have 2 groups of controls on a form. Based upon user selection either one or both groups of controls may be visible. Layout options are 1. one group next to the other group. Visually it looks strange if only the right side group are visible (ok when only left side group visible). 2. one group below the other group. Visually it looks strange if only one group are visible (ok when both groups visible). Is there a way to close the gap when only one group of controls are visible? Any ideas or suggestions appreciated :-) Many thanks, Jonathan Johathan, you can wri...

repeated text
how can i find repeated text on a spreadsheet, for example, i have a list of names that and i always update it with new names. Some of the names are repeated. how can i find the repeated names without looking in the entire spreadsheet myself? See: http://www.cpearson.com/excel/duplicat.htm -- Regards, Peo Sjoblom "maria" <maria@discussions.microsoft.com> wrote in message news:5129508F-9A3A-4A77-A8B7-E975831F2DCF@microsoft.com... > how can i find repeated text on a spreadsheet, for example, i have a list of > names that and i always update it with new names. Som...

Borders with aligned text
I dont think this is possible but I have changed the alignment for the text in some cells to 60 degrees but I want the borders to remain around the original normal cell rather than the aligned one. Does anyone know if there is an option I caan change to make this happen? Thanks Hi Pablo- I don't believe there is any standard option to do what you ask. There are not 2 cells in place of 1 when you apply the rotation alignment. The cell, itself is actually rotated and the rectangle that appears when you select one of those cells is simply a 'placeholder for the rotated cell. Per...

text wrap in merged cells #2
Thanks in advance for you help, I am creating a template which will be used to track large accounts. Text will be entered directly into cells, and most of the text will not require the row to expand in size. For the cases where I need an unlimited amount of room for text entry, I merged the cells across most of the printable field and then checked text wrap, and align left, but I can't get it to work. In addition I have formatted the rows to allow autofit, so then can expand automatically. What do I need to do to fix this simple problem? Thanks, Steve It's not all that si...

how do I prevent Excel from spilling text into adjacent columns?
When I have columns that are skinnier than the text they contain, the text spills into the adjacest column(s). How do I prevent this? It makes the spreadsheet very messy looking when I squeeze the columns to get an overview of the spreadsheet. Hi format these cells with word wrap ('format - Cells - alignment') "cp" wrote: > When I have columns that are skinnier than the text they contain, the text > spills into the adjacest column(s). How do I prevent this? It makes the > spreadsheet very messy looking when I squeeze the columns to get an overview > of t...

Limit rows in subform based on field in main form
I have a main form that has a number field (this field inidcates the number of seats available). I want the subform to only allow the user to enter data in rows that are equal or less than than the number field in the main form. please help with code and best place to enter. many thanks!!! cynteeuh wrote: >I have a main form that has a number field (this field inidcates the number >of seats available). I want the subform to only allow the user to enter data >in rows that are equal or less than than the number field in the main form. > >please help with code ...

Graph in Excel has one data label missing
I havea very simple chart made into a graph. There is one data label that does not show. All of the others are fine. How can I get it back. I checked the table and the data is there... the bar is even there but no label. Thanks to anyone that can help. Ellen Single click the series, then single click the data point. Then choose Format, Selected Data Point, activate the Data Label tab, and turn on the check box beside the option you want displayed. -- Cheers, Shane Devenshire "Ellen" wrote: > I havea very simple chart made into a graph. There is one data label t...

Trying to Change a Value in the Item Type Drop-Down on Item Maint
I have been trying to change the string displayed for one of the values in the Item Type field. I'm trying to replace "Kit" with something else because of some of the confusion that word causes. I can get to the list of values for the Item Type field and replace the "Kit" value with something else, but then I can never save the change. Any ideas? Thanks in advance. Open Modifier and locate the word "Kit" under the String resources. You can replace this word system wide. Best regards, -- MG.- Mariano Gomez, MIS, MCP, PMP Maximum Global Business, LLC ...

Text in cell is not visible! 8(
My cell is formatted to accept string type data. However, if the text length is bigger than the cell length then all I see are a bunch of "##################" characters in the cell. Can't Excel just show the text that fits in the cell and possibly clip off the text that extends beyond the cell??? How can I do this? thank u! Try changing the format to General. Excel has trouble strings between 256 and 1024 characters in cells formatted as Text. Robert Crandal wrote: > > My cell is formatted to accept string type data. However, if > the text ...

Can you input multiple series names and values with a single defined name ?
In Excel 2007, is it possible to create a dynamic chart with defined names without having to enter each individual series ? For example, the Horizontal (Category) Axis Labels can be input with a single defined name. A defined name could be used to specify B1:D1. However, it appears that if you want to enter in the Legend Entries (Series), you have to do them one at a time. Series Name = A2 and Series values = B2:D2 (this part could be a defined name). Is there an easier way to enter multiple series at once ? A B C D 1 May 1 May 2 May 3 2 Apple 1 3 6 3 Orange 2 6 18 4 Peach 3 9 27 E...

LOOPKUP 2 values in array
The table has dates in the columns and names in the rows An x indicates who's on duty that day. .............01-10-2004 ... 02-10-2004 ... 03-10-2004 ..... Sonja .........x Dirk ...............................x Katia .................................................. .x Jan .............x When I type a particular date, Excel should show the name with the x 03-10-2004 Katia Who can help me solve the problem? I have no knowledge of VBA code -- digica ----------------------------------------------------------------------- digicat's Profile: http://www.excelforum.com/member.php?actio...

creating labels
hi, how can i create labels so I can input about 100 names and they will print off in a label style, Ive tried everything please help!! -- \m/ O_O \m/ Laura..... :) Liverpool, England Laura, I would do a mail merge with word, For help on Word mail merge using Excel as the data source have a look here http://www.mvps.org/word/FAQs/MailMerge/CreateAMailMerge.htm http://www.mvps.org/word/FAQs/MailMerge/CreateADataSource.htm http://www.mvps.org/dmcritchie/excel/mailmerg.htm -- Paul B Always backup your data before trying something new Please post any response to the newsgroups s...

Printer fonts not visible
Hi I did a report a while ago set to Epson LQ-1050 and using the hardware fonts to speed up printing. Recently I had to make some changes to report but the problem is that the hardware printer fonts do not display in the fonts drop down in report designer even though I select the Epson LQ-1050 printer. What is the problem and how can I fix it? Thanks Regards ...

peak to peak values
Hi, I have a line chart with many peaks. What I would like to determine is the peak to peak values. I have tried this forum but no luck. Can anybody help? Regards, m4nd4li4 Do you want to identify where the peaks are? what the magnitude is of these peaks? - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ m4nd4li4 wrote: > Hi, > > I have a line chart with many peaks. What I would like to determine is > the peak to peak values. I have tried this forum but no luck. Can > anybody help? &g...