Problem with Input Mask wizard, store data with symbols

  • Thread starter Thread starter pluggedinns2
  • Start date Start date
P

pluggedinns2

Please excuse this question from an Access newbie. I've searched for
an answer, but apparently I'm not looking in the right places.

I have created a report (to output HTML) with a text box that contains
the following expression:
=IIf([tbl_Hotels!Phone1] Is Not Null,"<span class=" & Chr$(34) &
"controw3" & Chr$(34) & ">" & "Phone1: " & [tbl_Hotels!Phone1],"")

When setting up the Phone1 field, I've selected Text as the Data Type,
and used an Input Mask of !\(999") "000\-0000;0;_. My problem is that
even with the Input Mask defined as such, the report still outputs the
data as 9075551212 instead of (907) 555-1212. Is this because of my
underlying selection of Text as Data Type? If so, is there any way to
convert it to Number, without re-entering all the data manually?
 
[tbl_Hotels!Phone1]
is not valid syntax

what you need is

[tbl_Hotels].[Phone1]

the brackets go around each name -- tablename and fieldname
seperately

.... Is this a query expression? I see you are prefacing the
fieldname with the tablename ...

If the InputMask is not respected, try this:

& "Phone1: " _
& Format([tbl_Hotels].[Phone1], "(000) 000-0000")

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
 
Back
Top