dbTalk Databases Forums  

hide label in report

comp.databases.ms-access comp.databases.ms-access


Discuss hide label in report in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Access Developer
 
Posts: n/a

Default Re: hide label in report - 06-20-2011 , 04:43 PM






Ah, I see you followed Bob's suggestion and solved your problem. That's
good to know. Best of luck with your future Access work.

--
Larry Linson, Microsoft Office Access MVP
Co-author: "Microsoft Access Small Business Solutions", published by Wiley
Access newsgroup support is alive and well in USENET
comp.databases.ms-access


"Access Developer" <accdevel (AT) gmail (DOT) com> wrote

Quote:
Name and Date are Access Reserved Words and should not be used as Field
Names. (But I don't think that is the cause of your problem.) It is
better to use more specific names that are not Access reserved words, like
AttendeeName, or ClassDate.

Can you copy the SQL of your cross-tab query and paste it into a post
here?

Access can sometimes be a little "too helpful" by not including fields of
the Record Source unless they are specifically used as Control Source of a
Control in the Report. Perhaps that's why you are referring to the
Controls (e.g., textbox) in your code, and, of course, a CrossTab query
can be non-trivial to understand. I usually try to move any calculations
involving data into the Query that might be omitted from the RecordSource
of the Report because they are not the Control Source of a Control if I
can, so I don't "stumble over myself"

--
Larry Linson, Microsoft Office Access MVP
Co-author: "Microsoft Access Small Business Solutions", published by Wiley
Access newsgroup support is alive and well in USENET
comp.databases.ms-access


"flymo" <fly_mo (AT) hotmail (DOT) com> wrote in message
news:4e732af8-30cf-4644-85e4-e055faf85c51 (AT) b21g2000yqc (DOT) googlegroups.com...
On Jun 20, 1:39 pm, "Access Developer" <accde... (AT) gmail (DOT) com> wrote:
I'm not certain what you mean by

I set the crosstab up to show
___________AM__PM
name date___X___X

If the crosstab is, in fact, returning the values you show in the lines
following "I set the crosstab up to show" when the time is not available
or
the other information is not available, the field is neither a
zero-length
string nor is it null, and the textbox displaying it will not be, so
neither
your IF nor John's would be applicable. I agree with him that you need to
show the details.

--
Larry Linson, Microsoft Office Access MVP
Co-author: "Microsoft Access Small Business Solutions", published by
Wiley
Access newsgroup support is alive and well in USENET
comp.databases.ms-access

"flymo" <fly... (AT) hotmail (DOT) com> wrote in message

news:dc26ab9e-e17a-496d-b0bc-68d1ba497e5c (AT) d14g2000yqb (DOT) googlegroups.com...
On Jun 20, 10:55 am, John Spencer <JSPEN... (AT) Hilltop (DOT) umbc> wrote:









It would help if you included all the code and also told us what the
problem
is. Do you get a syntax error? The label controls are always visible?
The
label controls are never visible?

Perhaps you are executing the code in the wrong section of the report?
Are
you executing the code in the section where the labels are located (as
a
guess, the detail section)?

Is it possible that txtAM and txtPM are zero-length strings? You can
handle
zero-length strings, nulls, and strings that have multiple spaces using
expressions like the following:

Me.lblAM.Visible = Len(Trim(me.txtAM & "")) > 0
Me.lblPM.Visible = Len(Trim(me.txtPM & "")) > 0

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

On 6/20/2011 9:46 AM, flymo wrote:

Me.lblAM.Visible = Not (IsNull(Me.txtAM))
Me.lblPM.Visible = Not (IsNull(Me.txtPM))

Hello John
Yes I am using the detail section of the report and I have tried the
format & print events.
The labels are always visible regardless of what ever code I attach to
the events I also tried your attached lines without success.

I recreated another report in case the initial one was corrupted in
some way, unfortunately I get the same result.

I set the crosstab up to show
___________AM__PM
name date___X___X

I am trying to place the lblAM over txtAM if txtAM is not null the
label shows and covers the txtbox, if the txtAM is null then the txt
and label are hidden.

Hope this clarifies
Regards
John

Thanks Larry
I think I understand what is being asked for.

The query has the fields
Row - Name, Date
Column - session (can be AM,PM or EVE)
Count Value - Name
The crosstab actually shows in the report:

_____________AM__PM (this is the page header)

Name |Date | 1 | 1 |
Name |Date | 1 | |
Name |Date | 1 | 1 |
Name |Date | 1 | 1 |
Name |Date | |1 |

What I want to show is:

Name |Date | AM | PM |
Name |Date | AM | |
Name |Date | AM | PM |
Name |Date | AM | PM |
Name |Date | | PM |

When I try to apply null or "" or if txtAM >0 or txtAM = 1
the labels appear regardless of any condition set.


Hope this clarifies.
regards
John

Reply With Quote
  #12  
Old   
Bob Barrows
 
Posts: n/a

Default Re: hide label in report - 06-21-2011 , 09:36 AM






Access Developer wrote:
Quote:
Ah, I see you followed Bob's suggestion
.... that I was only able to offer after you finally succeeded in digging out
the relevant details from the OP. Sorry for the lack of a "PMFJI" preface.

Reply With Quote
  #13  
Old   
Access Developer
 
Posts: n/a

Default Re: hide label in report - 06-23-2011 , 09:28 AM



No PMFJI necessary -- I'm not "jealous" or "protective" of threads. The
important thing is to help the person asking the question. That's why I'm
here... and if I can do some groundwork and then you can help, that
accomplishes our purpose. I just appreciate what you do to help others.

--
Larry Linson, Microsoft Office Access MVP
Co-author: "Microsoft Access Small Business Solutions", published by Wiley
Access newsgroup support is alive and well in USENET
comp.databases.ms-access


"Bob Barrows" <reb01501 (AT) NOyahooSPAM (DOT) com> wrote

Quote:
Access Developer wrote:
Ah, I see you followed Bob's suggestion
... that I was only able to offer after you finally succeeded in digging
out
the relevant details from the OP. Sorry for the lack of a "PMFJI" preface.


Reply With Quote
Reply




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 On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.