Adding MR. or MRS. to existing field data

russi

Registered User.
Local time
Today, 13:29
Joined
Jul 18, 2000
Messages
385
Hi.
I have a table with a NAME field and a GENDER field.

How would I code a query so that if the gender is MALE than MR. would be added to the front of the existing data in the NAME field? MRS. if gender is FEMALE?

i.e., the result would be MR. SMITH, MR. JONES, MRS. CARSON...

Russ
 
NewField: IIf(Gender = "Male", "Mr. ", "Mrs. ") & Name

BTW, "Name" isn't a good name for a field, as it's a reserved word (Access uses it internally).
 
I would be very carful about your Female = Mrs assumption.
Some people that go by the titles Miss or Ms I have found can be offended.
 
and what about "Rev.", "Dr", "Prof". etc These can be unisex and if you call a Dr incorrectly, they get really upset about it.

Col
 
Thanks to all of you.
And, I should probably apologize.

The fields actually have different names and I am trying to insert other non-real-word text.
I simply thought the example I gave might be easier to understand and that the answer I got (and did get) would be easy enough to adapt (which it will be).

Thanks all for your input.

Russ
 

Users who are viewing this thread

Back
Top Bottom