Results 1 to 2 of 2

Thread: Input Mask Removed in Textbox on Report

  1. #1
    Join Date
    Jan 2009

    Input Mask Removed in Textbox on Report

    I use the following expression in a text box on a Report to trim off extra spaces and put in the words "Ext." if there is a phone extension and "Fax" is there is a fax number:

    =Trim([FirstName] & " " & [LastName]) & Chr(13) & Chr(10) & IIf(IsNull([Title]),"",[Title] & Chr(13) & Chr(10)) & [Contacts_Agency] & IIf(IsNull([Contacts_DivDept]),"",", " & [Contacts_DivDept]) & Chr(13) & Chr(10) & [address] & Chr(13) & Chr(10) & IIf(IsNull([Address2]),"",[Address2] & Chr(13) & Chr(10)) & [city] & ", " & [state] & " " & [Zip] & Chr(13) & Chr(10) & "Phone: " & [phone] & " " & IIf(IsNull([Ext]),"","Ext: " & [Ext]) & Chr(13) & Chr(10) & IIf(IsNull([Fax]),"","Fax: " & [Fax] & Chr(13) & Chr(10)) & [email]

    My problem is that the input mask (done at the table level) doesn't hold in this expression. If I add the phone field separately it appears just fine. Does anyone know what approach I can use to my input mask to stay on the phone number and fax fields?

  2. #2
    Join Date
    Jan 2009
    Portland, Oregon
    Input masks only work to help you in putting data in to the table, either via the table directly or via a form. It will not store it in that mode unless your input mask has the special part at the end which tells it to store it in the database with the characters involved, for example for a phone number this could be an input mask:
    !\(999") "000\-0000;0;_
    The part at the end ;0 before the ;_ tells it to store with the characters whereas this
    !(999) 000-0000;;_
    means to store without the characters.

    So, if you aren't storing it literally then you will have to format it in anything you use later.

Tags for this Thread

Posting Permissions

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