IIF statement

J

Julie

Hi All! I have a question about the IIF statement. Can
I use this statement to combine 3 different fields
containing 3 different parts of a phone number.

For example:

111 111 1111
222 222 2222
333 333 3333
444 444 4444
555 555 5555

I want the output to be: 1111111111, 2222222222, and so
on. I don't need any spaces of dashes of any kind. Is
this possible? Thanks in advance for any help and have a
great weekend.

Julie
 
B

Bob Barnes

Yes, do you know how to concatenate strings?

If so, in yout T/F conditions of the IIF, just concatenate
the appropriate fields...

IIF(IsNull(AreaCode),FirstPart & SecondPart,AreaCode &
FirstPart & SecondPart).

HTH - Bob
 
J

Julie

Hi Bob! Thanks for your response. I had done something
similar to this, but it didn't work. I separated it with
commas instead of using the & symbol. Your example
worked. Thanks so much and have a great weekend!

Julie
 
B

Bob barnes

Glad to help. You also have a great weekend.

Bob
-----Original Message-----
Hi Bob! Thanks for your response. I had done something
similar to this, but it didn't work. I separated it with
commas instead of using the & symbol. Your example
worked. Thanks so much and have a great weekend!

Julie
.
 

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