dbTalk Databases Forums  

Concatenated Fields

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


Discuss Concatenated Fields in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dave
 
Posts: n/a

Default Concatenated Fields - 11-01-2011 , 03:48 PM






I have created a report with a few concatenated fields, I want to be
able to hide some defaults I have created in the concatenated field.

For example one of the fields has some car details:
=[CarModel] & " " & [CarColour]

I want to able to hide the CarModel and/or the CarColour if they meet
certain criteria, so for example the CarModel bit would not show if it
was a Ford. So no Ford's would show but the colour would unless it was
a Red then that would be hidden also.

Any ideas would be much appreciated for me to work around this problem.

Reply With Quote
  #2  
Old   
Phil
 
Posts: n/a

Default Re: Concatenated Fields - 11-01-2011 , 04:42 PM






On 01/11/2011 21:48:05, Dave wrote:
Quote:
I have created a report with a few concatenated fields, I want to be
able to hide some defaults I have created in the concatenated field.

For example one of the fields has some car details:
=[CarModel] & " " & [CarColour]

I want to able to hide the CarModel and/or the CarColour if they meet
certain criteria, so for example the CarModel bit would not show if it
was a Ford. So no Ford's would show but the colour would unless it was
a Red then that would be hidden also.

Any ideas would be much appreciated for me to work around this problem.

In the underlying query you will need clauses like

IIf(Left([ConcatField],5)="Ford ",Mid([ConcatField],6),[ConcatField])

This will turn "Ford Blue" into "Ford", but leave "Fordson" unchanged
Phil

Reply With Quote
  #3  
Old   
Patrick Finucane
 
Posts: n/a

Default Re: Concatenated Fields - 11-01-2011 , 04:43 PM



On Nov 1, 4:48*pm, Dave <david_l... (AT) hotmail (DOT) com> wrote:
Quote:
I have created a report with a few concatenated fields, I want to be
able to hide some defaults I have created in the concatenated field.

For example one of the fields has some car details:
=[CarModel] & " " & [CarColour]

I want to able to hide the CarModel and/or the CarColour if they meet
certain criteria, so for example the CarModel bit would not show if it
was a Ford. So no Ford's would show but the colour would unless it was
a Red then that would be hidden also.

Any ideas would be much appreciated for me to work around this problem.
Instead of using
=[CarModel] & " " & [CarColour]
use something like
=FigureItOut([CarModel],[CarColor])
which calls the function FigureItOut. Then build the logic into your
function.

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 - 2013, Jelsoft Enterprises Ltd.