Solved

Access XP Report - programmatically remove field from inside address

Posted on 2011-09-21
3
215 Views
Last Modified: 2012-05-12
The inside address in this report has a textbox control called ParentOrganizationName and a textbox control ApplicantName. The data in these two controls may be the same or different.

When the data in the two fields is the same, I need to display only the ParentOrganizationName, collapse (?) the ApplicantName control so that it disappears for that report, and move the controls in the inside address together to leave no gaps in the inside address.

Thank you,
Ron
0
Comment
Question by:rnhoepp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 48

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 36575773
How are you displaying these now ?  Two separate fields?

You could combine them in the query that is the RecordSource for your report, something like:

FieldName: [ParentOrganizationName] & IIF([ParentOrganizationName] = [ApplicantName], "", " (" & [ApplicantName] & ")")

Then you would only need one field, and it would contain both values if these fields were different.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 36575790
try this

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
me.ApplicantName.visible= me.ParentOrganizationName<> me.ApplicantName
End Sub
0
 

Author Closing Comment

by:rnhoepp
ID: 36576917
Hi fyed,

You helped me turn the corner on this one. I'd tried working in the query, but keeping the fields separate, then attempting to format in the report...but no luck.

So I tested what you sent me, and it worked! However, I wanted the two names in separate lines if the organization and applicant were different names.

This is how I changed it:

OrganizationOrApplicant: [ParentOrganizationName] & IIf([ParentOrganizationName]=[ApplicantName],"",Chr(13) & Chr(10) & [ApplicantName])

Thank you so much. And thanks to Capricorn1 for your submission.

Regards,
Ron
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
My Do While is Not Producing Anything 15 88
ms access - Helpdesk ticket system 5 53
Access Report via Windows Desktop Shortcut 12 46
how to get hundreds part from the number 1 31
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question