Subreport based on query: Display/print ID number or Full name onl

I have designed a summary report that shows average ratings respondents give 
for seminar sessions. I have several subreports based on different queries 
that give me a Respondents ID number, full name, and any verbatim comments 
the respondent made.    Clients and instructors now only want to see the 
respondents ID number only if there is no name.  I just started learning VB 
so, I'm way out of my comfort zone here!

TextBox FullName's control source is =[RspFname]&" "&[RspLname]
RspID (PK) visible property is set to true

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
 If FullName <> Null Then
 RspID.Visible = False
 Else
 RspID.Visible = True
  End If
End Sub

No ID or Name prints at all, just comments.  Does DisplayWhen work for 
controls or for the entire Detail section?  

Thanks in advance for any help you can give.




-- 
the weirder I get, the happier I am
0
Utf
5/21/2007 9:50:02 PM
access.reports 4434 articles. 0 followers. Follow

3 Replies
746 Views

Similar Articles

[PageSpeed] 43

When you compare a value with Null don't use = or <> Use instead  IsNull

If Not IsNull(FullName) Then
 RspID.Visible = False
 Else
 RspID.Visible = True
End If
******************
Or, to make it in one line

RspID.Visible = IsNull(FullName) 

-- 
Good Luck
BS"D


"AccessVBNewB" wrote:

> I have designed a summary report that shows average ratings respondents give 
> for seminar sessions. I have several subreports based on different queries 
> that give me a Respondents ID number, full name, and any verbatim comments 
> the respondent made.    Clients and instructors now only want to see the 
> respondents ID number only if there is no name.  I just started learning VB 
> so, I'm way out of my comfort zone here!
> 
> TextBox FullName's control source is =[RspFname]&" "&[RspLname]
> RspID (PK) visible property is set to true
> 
> Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
>  If FullName <> Null Then
>  RspID.Visible = False
>  Else
>  RspID.Visible = True
>   End If
> End Sub
> 
> No ID or Name prints at all, just comments.  Does DisplayWhen work for 
> controls or for the entire Detail section?  
> 
> Thanks in advance for any help you can give.
> 
> 
> 
> 
> -- 
> the weirder I get, the happier I am
0
Utf
5/21/2007 10:37:00 PM
When you compare a value with Null don't use = or <> Use instead  IsNull

If Not IsNull(FullName) Then
 RspID.Visible = False
 Else
 RspID.Visible = True
End If
******************
Or, to make it in one line

RspID.Visible = Not IsNull(FullName) 

-- 
Good Luck
BS"D


"AccessVBNewB" wrote:

> I have designed a summary report that shows average ratings respondents give 
> for seminar sessions. I have several subreports based on different queries 
> that give me a Respondents ID number, full name, and any verbatim comments 
> the respondent made.    Clients and instructors now only want to see the 
> respondents ID number only if there is no name.  I just started learning VB 
> so, I'm way out of my comfort zone here!
> 
> TextBox FullName's control source is =[RspFname]&" "&[RspLname]
> RspID (PK) visible property is set to true
> 
> Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
>  If FullName <> Null Then
>  RspID.Visible = False
>  Else
>  RspID.Visible = True
>   End If
> End Sub
> 
> No ID or Name prints at all, just comments.  Does DisplayWhen work for 
> controls or for the entire Detail section?  
> 
> Thanks in advance for any help you can give.
> 
> 
> 
> 
> -- 
> the weirder I get, the happier I am
0
Utf
5/21/2007 10:38:04 PM
Thanks very much.
-- 
the weirder I get, the happier I am


"Ofer Cohen" wrote:

> When you compare a value with Null don't use = or <> Use instead  IsNull
> 
> If Not IsNull(FullName) Then
>  RspID.Visible = False
>  Else
>  RspID.Visible = True
> End If
> ******************
> Or, to make it in one line
> 
> RspID.Visible = IsNull(FullName) 
> 
> -- 
> Good Luck
> BS"D
> 
> 
> "AccessVBNewB" wrote:
> 
> > I have designed a summary report that shows average ratings respondents give 
> > for seminar sessions. I have several subreports based on different queries 
> > that give me a Respondents ID number, full name, and any verbatim comments 
> > the respondent made.    Clients and instructors now only want to see the 
> > respondents ID number only if there is no name.  I just started learning VB 
> > so, I'm way out of my comfort zone here!
> > 
> > TextBox FullName's control source is =[RspFname]&" "&[RspLname]
> > RspID (PK) visible property is set to true
> > 
> > Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
> >  If FullName <> Null Then
> >  RspID.Visible = False
> >  Else
> >  RspID.Visible = True
> >   End If
> > End Sub
> > 
> > No ID or Name prints at all, just comments.  Does DisplayWhen work for 
> > controls or for the entire Detail section?  
> > 
> > Thanks in advance for any help you can give.
> > 
> > 
> > 
> > 
> > -- 
> > the weirder I get, the happier I am
0
Utf
5/22/2007 12:50:00 PM
Reply:

Similar Artilces:

Sequentially number records in a query
Hi all - I know this is a common question, but I haven't found a complete answer. Is there a technique to generate a sequentially-numbered, calculated column in an Access query so that the records in the query output are numbered 1 through N, where N is the number of records ? Thanks in advance for any advice or leads, Jay There are lots of questions and answers related to your question. You might want to search on "ranking query". If you still can't find an answer, then come back with your significant table and field names. -- Duane Hookom Microsoft Access MVP ...

Log changes to full access permission
Exchange 2007 SP1. Is there a log, or is it possible to log, whenever anyone is granted full access to a mailbox or mailboxes? Thank you. Adrian What do you mean by "anyone"? Please make your request more specific. -- Ed Crowley MVP "There are seldom good technological solutions to behavioral problems." .. "Adrian" <NoSpam@Hotmail.com> wrote in message news:%23eQ58rEaKHA.1640@TK2MSFTNGP06.phx.gbl... > Exchange 2007 SP1. > > Is there a log, or is it possible to log, whenever anyone is granted full > access to a ma...

Positioning Page Numbers
We are trying to print page numbers in the upper right hand corner of the page. The Excel charts will be included as part of a Word report so we want the page setups to look the same. In Excel we cannot find a way to move the page numbers even with the margin of the page as they are in Word. I can do this with numbers on the left hand side of the page by inserting spaces before the number in the set up box, but I cannot find a way to move the page numbers in from the right hand side. Any ideas? seems so simple, but...... Kathy the only way I can think of that gets close is as...

How do I enter a decimal in a string of numbers in Excel? Example.
Please post your question in the BODY of the message, not the subject line, and clarify with an example of the initial data and what you want to end up with. If it's to translate 123 to 1.23, you divide by 100. On Wed, 9 Feb 2005 15:03:07 -0800, Joy <Joy@discussions.microsoft.com> wrote: ...

How to create a report based on multiple queries
Hi all, I am trying to create a report based on 30 queries . These 30 queries are based on one table. When I use the Report wizard and select more than one query I get the message " You have chosen fields from record source which the wizard can't connect. You may have chosen fields from a table and from a query based on that table. If so try choosing fields from only tha table or only the query". I do not know what to do.? Any guidance will help thanks, Dave On Wed, 29 Aug 2007 08:21:02 -0700, davidstevans@gmail.com wrote: >Hi all, > >I am trying to create a rep...

printing colors in gray on laser
I'm not sure if this is a Publisher issue or a printer problem, but on the off chance that it IS Publisher, I know someone here will know that and might even have an answer. I have a Publisher file that has gray text in it and when I print it on a laser printer the text comes out solid black. I used to print in gray all the time and I'm not sure when this problem started (since the new version of Publisher [we just got 2003] or since my printer driver got updated). Does anyone have any idea how I can print text in gray? Thanks!! Check your printer settings. It may be in there...

Incrementing named cells
Merry Christmas everyone!!! Was wondering if any of you can help me with this. I have a financial model that currently has numerous named cells in the format of XXX_03 ( the 03 is to denote 2003 ) but I am making 2004 projection and therefore am wondering if there was an easy way to sort of copy and paste the names into a new column and automically renaming cells by an increment of 1 to XXX_04. If anyone can help, it will be greatly appreciated! Thank you Justin See one answer 1 minute later -- Don Guillett SalesAid Software donaldb@281.com "Justin" <jsim_hba2003@hot...

Problems Printing a Linked Word document
I am having trouble printing a word document that has linked excel tables in it. When I print the document, some of the linked excel tables get skewed and distorted. However, they look normal on screen. What causes this? How can I fix it? -- jc ...

Print Problem 06-03-07
I have a form with a button from which I want to print 3 reports. I built a macro which opens and then printout each report one after the other. The problem is that access prints out the report followed by the form from which the print action is initiated. I also tried closing the form in the macro, before print the reports which prints each report followed by printing the switchboard...what am I doing wrong? On Sat, 02 Jun 2007 20:27:39 -0700, Duck <charles.kendricks@charter.net> wrote: >I have a form with a button from which I want to print 3 reports. I >built a macro whic...

Customized display order for fields
I need to define formats (i.e. bold, underline) for reference table fields. For example, let’s say reference table A contains three fields: Field1, Field2, Field3 and two rows. Reference Table A ID _Num Field1 Field2 Field3 1 Single Double Triple 2 Single Double Quadruple Forms need to know that for row 1 Double will be in bold and Triple will be underlined. However, for row 2, only Quadruple need to display in bold on forms, reports, etc. In the example above, what if I wanted the first row to be displayed on a form as Triple, Single, Double and the second row to be...

Custom PopUpBox in Parameter Query
I am using a custom PopUp Box in parameter Query. ( Like [Forms]![Form For Plant Wise Query]![ComboPlant] ). It is working fine when i am calling this query in my report i.e. when i open the report the custom popup box appear asking the value and after giving the parameter value the specified report open. But when i use the same query as record source in my form and when i open the form, first the system generated PopUp Box appear asking the parameter value and after giving the value, then the custom PopUp box appear. I don't want this system generated Popup Box to appear when i open t...

Track Changes Query
Hi I wonder if someone could help me please with a problem that's been baffling for a few weeks now. I am trying to create a query, which in turn feeds a report, that shows tracked changes. I have previously posted on this forum and got some great advice that's really helped me along but I'm really struggling with the query to extract the data. I am relatively new to Access in particular VBA but I am willing to learn. What I would like to do is to use a date parameter to extract those fields with an updated time stamp within a given time period, which in turn I can sho...

Deleting rows in Excel based on criteria
Is it possible to automate the deletion of row based on a criteria, preferably through a macro? i.e. - run the macro and delete any row who has "NO" in last column. >and delete any row who has "NO" in last column. last column IV ?? -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "SteveM" <anonymous@discussions.microsoft.com> wrote in message news:05ac01c3afb9$b76f96a0$a101280a@phx.gbl... > Is it possible to automate the deletion of row based on a > criteria, preferably through a macro? i.e. - run the > macro an...

Missing Batch ID
We posted out FA depreciation & all seem to go fine, but when I look at my YTD Depre, the batch id is gone. Any ideas? Another bit of information, the source document for the most recent depreciation posting was "fassum" where as previous ones were "fadep". What would of caused this? I have a new staff running the depre, but its fine in the other companies, just one that has this "fasum". Can't seem to find any doc on this. "Merle" wrote: > We posted out FA depreciation & all seem to go fine, but when I look at my &...

Opportunity Retrieve method not returning Id
I am trying to add functionality to the CRM such that CRM has the ability to duplicate or copy existing opportunities in order to create a new opportunity. What I want to do is to create a "Copy Opportunity" button on the Opportunity form.The button allows to navigate to a custom aspx page. By enabling parameter passing, I can pass the object type (opportunity)and object id to the custom aspx page. The code behind for this custom aspx page should create the new opportunity using the CRMOpportunity Create method, and maybe just have a text box where the user could type the name of th...

Month display in Microsoft Outlook 2003's Calendar
When using Microsoft Outlook 2003's Calendar in Month view, Saturday and Sunday are combined as one square (yes, they do have the date numbers and a line between them). This may be convenient for people using Outlook only for business purposes, but if someone were to have a job that involved weekends, or was not using Outlook for business purposes at all (which is my case), this could be extremely annoying. I would like to know if there is a way to display the Month view as the standard Sunday on the left and Saturday on the right, with Monday through Friday in between. I want all d...

Knowledge Base Document 862303
In an earlier post dated 9 December, I asked about resolving a register that has "server failure 111 while attempting to create a journal entry." A reply posted referred to this link. I've not yet received my log on info to access the PartnerSource (my application to become an RMS partner was fax'ed a few weeks ago). Any chance someone could send me this document as an attachment? https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb;en-us;862303 Thanks, Rick rbiservices@comcast.net ...

Fill Down based on variable, offset?
Hi all and thanks for such an AMAZING site! You've vicariously gotte me out of several programming jams in the past, and I'm now a littl embarrassed to find myself between a code and a hard place. I am writing (trying, anyway) VBA to do the following: Once a macro is executed, excel looks at rows that have the followin information: ColA ColB ColC ColD ITEM# SLOT# DESCRIPTION # of Labels 5301 DF212 Black Beans 5 1624 CA172 Rice 2 I need to tell excel to (on a different sheet) create: 5301 Black Beans DF2...

Change size of name box
This is a multi-part message in MIME format. ------=_NextPart_000_003C_01C3D233.5A184190 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Is it possible to change the size of the name box ? And how do you do it = ? Some of my range's names are to long to fit in the actual name box. Thanks in Advance, and may all of you have a healthy 2004 Gilbert ------=_NextPart_000_003C_01C3D233.5A184190 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HT...

Exchange Cluster Query
Hi All I currently have an exchange 2000 setup which recieves email from a filter system on the DMZ to a single exchange server which then forwards it on to the 2 node cluster. I want to eliminate this single server and wondered if i could send the mail from the dmz straight to the clustered IP address instead, if not what else could I do to get rid odf this server. Thanks Phill On Tue, 11 Jan 2005 06:41:01 -0800, "Phill Heath" <PhillHeath@discussions.microsoft.com> wrote: >Hi All > >I currently have an exchange 2000 setup which recieves email from a filter ...

Macro to Print labels in Word
Does anybody know of an Outlook (2003) macro that has been written to print labels in Word (2003)? If there is one, it might be listed at http://www.slipstick.com/contacts/printlabel.htm . You can also just use a mail merge, you know. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Bob S" <drbobsing@nospam.com> wrote in message news:ehiHZJeXEHA.2952@TK2MSFTNGP12.phx.gbl... > Does anybody know of an Outlook (2003) macro that has been ...

Find all cells with a number and mulitply
How can I find all cells in a sheet that are a number greater than zero and multiply each one by a number? IE: the number to multiply by is 1.2 A1 Tom A2 25 A3 0 G12 Bob G13 25 I want to programatically (without using a macro) find cells a2 and g13 only and multiply them by 1.2 Thanks in advance for your help. Jim Jim, As long as you don't have any negative numbers, it doesn't matter about being > 0 (0*n=0) or being text. Try this Put 1.2 in a spare cell and then copy it Select all the cells Goto menu Edit>Pastespecial Click the Multiply option OK out Now clear the c...

Querying Messages Addressed to a Domain
Dumb Question: We have a single Exchange 2003 server receiving e-mail messages addressed to domain1.com, domain2.com, and domain3.com. We'd like to turn off domain1.com, but want to make sure messages aren't being addressed to that domain even though it's not the primary in the recipient policy. How do I search the information store for any inbound messages addressed to this domain? Can I do it on the fly over the past say 6 months or does some type of logging need to have been enabled? Thanks, Message Tracking would need to be enabled, or SMTP Protocol logging (the la...

how do I print multiple print areas on one page
I have a wide worksheet that is not very deep i.e. lots of columns but not many rows. I have it in landscape but it is still too wide to go on one page. I would like to be able to print the right hand side of the worksheet underneath the left hand side of the worksheet, on one page, rather than having to print out two pages. Is this possible? This is a common question. The only way to do this is to create what you want printed. In other words, copy all of your data to a blank sheet, then cut/paste to get what you want, then print it. You can do this with a macro and nev...

sum a field value in all querys
hello everyone How do i sum a value with another field (always the same one) in all my querys? Later, i would like to change that value to see the result in all querys. How do i do that? Please explain me best you can do cose i'm not an expert on access. Tks in advance Pedro Hi Pedro, What is the data type of the other field (always the same one)? The value you wish to sum it with - what data type is it? For example: if you had a query where one field was called rating and it was a long integer, if you wanted to add the value 4 to this you could create a calculated field in the que...