Hi,
I have an annoying little problem in that I am trying to report on a list od
Departments, Dept Heads and Deputies so I have the following in my report:
=DepartmentName & IIf(IsEmpty([DeptHeadName]),""," (" & [DeptHeadName] &
IIf(Isempty([DeptDeputyName]),")"," / " & [DetDeputyName] & ")"))
So what I exect to get is say
Marketting (Barney Rubble)
or
Purchasing (Fred Flintstone / Britney Spears)
what I am getting is
Marketting (Barney Rubble / )
oe in a department where no head and deputy have been assigned yet I get
Adminiatration ( / )
rather than just
Administration
I have tried IsNull instead of IsEmpty
I have tried DeptHeadName = ""
and
DeptHeadName = " "
It all seems so simple in the help and on the examples I have found on the
web... where am I going wrong...?
Any help appreciated as always
Ian 7 1608
How about
departmentname & iif(isnull(deptheadname) and
isnull(deptdeputyname),"","(") & deptheadname +
iif(isnull(deptdeputyname),"","/") & deptdeputyname &
iif(isnull(deptheadname) and isnull(deptdeputyname),"",")")
the + trick will show both ends if they are not null (and the / is never
null of course) and if there would always be a deptheadname, the whole
expression would be a lot simpler. But I read it isn't that simple.
It takes some evaluation. Maybe you can put some of the calculations in
the datasource?
Keldar wrote: Hi,
I have an annoying little problem in that I am trying to report on a list od Departments, Dept Heads and Deputies so I have the following in my report:
=DepartmentName & IIf(IsEmpty([DeptHeadName]),""," (" & [DeptHeadName] & IIf(Isempty([DeptDeputyName]),")"," / " & [DetDeputyName] & ")"))
So what I exect to get is say
Marketting (Barney Rubble) or Purchasing (Fred Flintstone / Britney Spears)
what I am getting is
Marketting (Barney Rubble / )
oe in a department where no head and deputy have been assigned yet I get
Adminiatration ( / ) rather than just Administration
I have tried IsNull instead of IsEmpty I have tried DeptHeadName = "" and DeptHeadName = " "
It all seems so simple in the help and on the examples I have found on the web... where am I going wrong...?
Any help appreciated as always
Ian
--
Bas Cost Budde
There's a really cool solution to this. Use the ampersand (&) mixed with
the plus sign (+) to filter nulls.
Result = [DeptHeadName] & (" / " + [DetDeputyName])
If DetDeputyName is null, plussing it with a string text results in NULL.
--
Danny J. Lesandrini dl*********@hotmail.com http://amazecreations.com/datafast
"Keldar" <ia*******@keldar.freeserve.co.uk> wrote ... Hi,
I have an annoying little problem in that I am trying to report on a list od Departments, Dept Heads and Deputies so I have the following in my report:
=DepartmentName & IIf(IsEmpty([DeptHeadName]),""," (" & [DeptHeadName] & IIf(Isempty([DeptDeputyName]),")"," / " & [DetDeputyName] & ")"))
So what I exect to get is say
Marketting (Barney Rubble) or Purchasing (Fred Flintstone / Britney Spears)
what I am getting is
Marketting (Barney Rubble / )
oe in a department where no head and deputy have been assigned yet I get
Adminiatration ( / ) rather than just Administration
I have tried IsNull instead of IsEmpty I have tried DeptHeadName = "" and DeptHeadName = " "
It all seems so simple in the help and on the examples I have found on the web... where am I going wrong...?
I think I get your Jist...
I am back in the office tomorrow and will try it out
Thanks
"Bas Cost Budde" <ba*@heuveltop.org> wrote in message
news:bv**********@news2.solcon.nl... How about
departmentname & iif(isnull(deptheadname) and isnull(deptdeputyname),"","(") & deptheadname + iif(isnull(deptdeputyname),"","/") & deptdeputyname & iif(isnull(deptheadname) and isnull(deptdeputyname),"",")")
the + trick will show both ends if they are not null (and the / is never null of course) and if there would always be a deptheadname, the whole expression would be a lot simpler. But I read it isn't that simple.
It takes some evaluation. Maybe you can put some of the calculations in the datasource?
Keldar wrote:
Hi,
I have an annoying little problem in that I am trying to report on a
list od Departments, Dept Heads and Deputies so I have the following in my
report: =DepartmentName & IIf(IsEmpty([DeptHeadName]),""," (" & [DeptHeadName] & IIf(Isempty([DeptDeputyName]),")"," / " & [DetDeputyName] & ")"))
So what I exect to get is say
Marketting (Barney Rubble) or Purchasing (Fred Flintstone / Britney Spears)
what I am getting is
Marketting (Barney Rubble / )
oe in a department where no head and deputy have been assigned yet I get
Adminiatration ( / ) rather than just Administration
I have tried IsNull instead of IsEmpty I have tried DeptHeadName = "" and DeptHeadName = " "
It all seems so simple in the help and on the examples I have found on
the web... where am I going wrong...?
Any help appreciated as always
Ian
-- Bas Cost Budde
Welcome.
Not a native english speaker, I'd like to understand the 'feel' conveyed
by Jist. Would you like to tell me the short story?
Keldar wrote: I think I get your Jist...
--
Bas Cost Budde
My first thought too; it seems however that deptheadname can be null as
well, in which case he's left with that '/'
Danny J. Lesandrini wrote: There's a really cool solution to this. Use the ampersand (&) mixed with the plus sign (+) to filter nulls.
Result = [DeptHeadName] & (" / " + [DetDeputyName])
If DetDeputyName is null, plussing it with a string text results in NULL.
--
Bas Cost Budde
"Bas Cost Budde" <ba*@heuveltop.org> wrote in message
news:bv**********@news2.solcon.nl... Welcome. Not a native english speaker, I'd like to understand the 'feel' conveyed by Jist. Would you like to tell me the short story?
Keldar wrote:
I think I get your Jist...
The correct spelling is gist. http://dictionary.reference.com/search?q=gist This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Daniel Bergquist |
last post by:
Consider the following chunk of code:
--------------------------------------------------
open (IN, "<:raw", "test2.txt") or die "Can't open test.txt";
chomp($line = <IN>);
# Capture excerpt...
|
by: Andrew |
last post by:
I use conditional compiler constants, set through the VBA IDE in
Tools, <projectname> Properties, that I refer to throughout my code to
control which code is used during development, and which...
|
by: Andrew Chanter |
last post by:
Does anyone know a way you can use conditional formatting to create a banded
style view as is commonly seen on the internet. (In othe words the first
record appears on a gray background, the 2nd...
|
by: ammarton |
last post by:
Hello all...I'm a bit new to working with Macros in Access so forgive
me if the terminology I use is not accurate.
To preface this, basically I am using a form on a replicated database
so the...
|
by: Trapulo |
last post by:
I'm using conditonal compile with statement #IF CONFIG
This works if I use #IF CONFIG = "Debug" or #IF CONFIG= "Release"
But if I define an other compilation profile, eg. "BestRelease", and I use...
|
by: GAC |
last post by:
I've used conditional formatting on ACCESS reports but have come up with a problem using it for a FIELD that has a value of either YES or blank/null.
The default formatting (used when condition(s)...
|
by: afromanam |
last post by:
Regards,
Please help
What I'm trying to do is this: (and I can't use reports since I must export to Excel)
I export some queries to different tabs in an excel workbook
I then loop through...
|
by: banderson |
last post by:
Hello,
I have a combo box in which I want to display multiple fields by concatenating the fields together. If one of those concatenated fields is Null, then the combo box does not show anything. To...
|
by: summerlw |
last post by:
Access 2003
VB 6.5
I'm attempted to run conditional formatting on a date field based on the value in another field. I've steped through this code and it is recognizing the values correct and is...
|
by: gtslabs |
last post by:
I have a report with 2 subreports
The first subreport has 3 fields (Expr1, Field1, Field2) Where Expr1
is a Date
I want to highlight the 3 fields if a date is within a range of 2
dates.
I was...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |