A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

visible label based on text value



 
 
Thread Tools Display Modes
  #1  
Old March 27th, 2010, 05:29 PM posted to microsoft.public.access.reports
jer
external usenet poster
 
Posts: 30
Default 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
  #2  
Old March 27th, 2010, 06:14 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default visible label based on text value

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]
  #3  
Old March 27th, 2010, 08:42 PM posted to microsoft.public.access.reports
jer
external usenet poster
 
Posts: 30
Default visible label based on text value

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]
.

  #4  
Old March 27th, 2010, 09:50 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default visible label based on text value

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]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:23 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.