Hide and move up a textbox based on previous textbox

M

moosecck

Hello,

Using Access 2003. I have a report called rpt_Declined_Letter which is
based on a table called tbl_MailMerge_Declined. These reports are
letters which are sent to a customer when we decline their credit
application. We use the following fields as the customer address.
[T&S Signor]
[Corporate Name]
[DBA/Trade Name]
[Billing Address]
=Trim([Billing City] & (", "+[Billing State]) & " " & [Billing Zip])

My problem is when [Corporate Name] = [DBA/Trade Name] I need to have
the [DBA/Trade Name] textbox blank and have the textboxes underneath
the [DBA/Trade Name] textbox move up 1 line. The credit department
enters the application data into the MailMerge_Declined table from
paper applications and if they don't have a "do business as" ([DBA/
Trade Name]) they will enter the Corporate Name in the DBA/Trade Name
spot. We don't want the customer to see double entries when they get
the letter. I have tried using the Hide Duplicates properties but it
doesn't seem to work in this case. Any help will be greatly
appreciated.

Thanks,

Tom
 
D

Duane Hookom

Set these propertiesor the [DBA/Trade Name] text box:
Control Source: =IIf([Corporate Name] = [DBA/Trade Name] ,Null,[DBA/Trade
Name])
Can Shrink: Yes
 
M

moosecck

Set these propertiesor the [DBA/Trade Name] text box:
Control Source: =IIf([Corporate Name] = [DBA/Trade Name] ,Null,[DBA/Trade
Name])
Can Shrink: Yes

--
Duane Hookom
Microsoft Access MVP



Using Access 2003. I have a report called rpt_Declined_Letter which is
based on a table called tbl_MailMerge_Declined.  These reports are
letters which are sent to a customer when we decline their credit
application.  We use the following fields as the customer address.
[T&S Signor]
[Corporate Name]
[DBA/Trade Name]
[Billing Address]
=Trim([Billing City] & (",  "+[Billing State]) & "  " & [Billing Zip])
My problem is when [Corporate Name] = [DBA/Trade Name] I need to have
the [DBA/Trade Name] textbox blank and have the textboxes underneath
the [DBA/Trade Name] textbox move up 1 line.  The credit department
enters the application data into the MailMerge_Declined table from
paper applications and if they don't have a "do business as" ([DBA/
Trade Name]) they will enter the Corporate Name in the DBA/Trade Name
spot.  We don't want the customer to see double entries when they get
the letter.  I have tried using the Hide Duplicates properties but it
doesn't seem to work in this case.  Any help will be greatly
appreciated.

Tom- Hide quoted text -

- Show quoted text

Duane,
Your response is a partial answer to the problem. What I did was
this:
Moved the [Corporate Name] textbox under =Trim([Billing City] & (", "+
[Billing State]) & " " & [Billing Zip])
string and then hid it.
Created three conditional IIF statements like so:
=IIf(([DBA/Trade Name]=[Corporate Name]),[Billing Address],[DBA/Trade
Name])
=IIf(([DBA/Trade Name]=[Corporate Name]),([Billing City] & ", " & " "
& [Billing State] & " " & [Billing Zip]),[Billing Address])
=IIf(([DBA/Trade Name]=[Corporate Name])," ",[Billing City] & ", " &
" " & [Billing State] & " " & [Billing Zip])
This works for me because it allows the comparison of the [Corporate
Name] and [DBA/Trade Name] textboxes and if there is a match between
them, hides the [DBA/Trade Name] by not including it in the statement
and showing statement I want to see with the match. If there is no
match, then the line will show the original line as seen in my
original query.
The greatest part about this solution is that I figured it out
myself! Learning every day!

Just wanted to get this out to the group as the people here have
helped me immeasurably in the past.

Thanks everyone!!!
Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top