Address label

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a solution for this problem:

Man: Dr. Name
Female: Madam dr. Name
Man, no title: Sir Name
Female, no title: Madam Name

How to omit Sir when the person is a Man and keep -Dr. Name- only.
How to make the “Dr.†appear in small case when the person is a female
(Madam dr.).
Third problem: when there is no title available, it appears like this on the
label: -Sir Name- and -Madam Name-.

There are 2 separate fields now for both Titles and Sir/Madam data in the
Access database.

(The Madam/Sir/Dr. are examples to illustrate this question.)
 
Hi Beyan

This is just a bit of air code (off the top of my head) so you will need to
check it but I hope it points you in the right direction.


Something:IIF([Sex]=â€Man†AND [Title]<>â€Dr â€,[Title]&[Name], iif([Sex]=â€Manâ€
AND [Title]=â€Drâ€,â€Dr â€&[Name], iif([Sex]=â€Female†AND [Title]=â€Drâ€,â€Madam dr
“&[Name], iif([Sex]=â€Femal†AND [Title]<>â€Drâ€,â€Madam “[Name]))))

For more information open access press F1 and search on "Nested IIF"
 
Thank you very much! I like IIf, Access, this community and all Manchester..
Expr1:IIf([Sex]="Female" And [title]="Dr.",[Sex] & " " & "dr." & " " &
[Name],IIf([Sex]="Male" And [title]="Dr.", [Title] & " " &
[Name],IIf([Sex]="Male" And [title]<>,"Dr.",[Sex] & " " & [Name],
etc..etc..etc..)))

Wayne-I-M said:
Hi Beyan

This is just a bit of air code (off the top of my head) so you will need to
check it but I hope it points you in the right direction.


Something:IIF([Sex]=â€Man†AND [Title]<>â€Dr â€,[Title]&[Name], iif([Sex]=â€Manâ€
AND [Title]=â€Drâ€,â€Dr â€&[Name], iif([Sex]=â€Female†AND [Title]=â€Drâ€,â€Madam dr
“&[Name], iif([Sex]=â€Femal†AND [Title]<>â€Drâ€,â€Madam “[Name]))))

For more information open access press F1 and search on "Nested IIF"

--
Wayne
Manchester, England.
Enjoy whatever it is you do


Beyan said:
Is there a solution for this problem:

Man: Dr. Name
Female: Madam dr. Name
Man, no title: Sir Name
Female, no title: Madam Name

How to omit Sir when the person is a Man and keep -Dr. Name- only.
How to make the “Dr.†appear in small case when the person is a female
(Madam dr.).
Third problem: when there is no title available, it appears like this on the
label: -Sir Name- and -Madam Name-.

There are 2 separate fields now for both Titles and Sir/Madam data in the
Access database.

(The Madam/Sir/Dr. are examples to illustrate this question.)
 
Back
Top