Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Concatenating Phone/Fax Numbers (Access 2003/SP 1)

    I have a report that I need to use as little space as possible, so I concatenated the phone/fax numbers so I didn't have to have 2 controls. If the fax number is null, I needed to Shrink the control, but apparently you can't shrink a label, so I concatenated them into 1 field. Here is the record source =Trim([Phone] & ("/"+[Fax])) and here is the Format !(999") "000-0000;0;_. If I have just a phone number, it has the correct format, but if I have both, it is just a string of numbers. Any ideas?

    See attached picture for example.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Concatenating Phone/Fax Numbers (Access 2003/SP 1)

    !(999") "000-0000;0;_ is not a format string but an input mask. If you has used this as an input mask in the phone and fax fields, the literal characters would have been stored in the fields, so that they would have been preserved in the concatenation. But from your screenshot, this appears not to be the case. Try

    Format([Phone],"(#) 000-0000") & IIf(Not IsNull([Phone]) And Not IsNull([Fax]),"/",Null) & Format([Fax],"(#) 000-0000")

    and clear the Format property.

  3. #3
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Concatenating Phone/Fax Numbers (Access 2003/S

    Yes, I wrote that wrong. I had that as the input mask.

    Your solution did the trick. Thanks a lot!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •