[AccessD] Phone Number with optional extension

Charlotte Foust charlotte.foust at gmail.com
Mon May 28 17:06:44 CDT 2012


So is the extension in its own field?  You can try:

=format$([telephonefield], "(999) 999-9999") & " "
& IIF(Len(Trim([extensionfield]))>0,format$([extensionfield], "#"), "")

Maybe I'm not understanding the problem.

Charlotte Foust
On Mon, May 28, 2012 at 12:05 PM, Rocky Smolin <rockysmolin at bchacc.com>wrote:

> I'm creating a sentence in code like
>
> "Please call Joe blow at: " & (then add the phone number here) & " for more
> information about the class."
>
> The phone number is standard 3-3-4 but may or may not have an extension of
> 1
> to 5 numbers.
>
> In the database it's a mix of formatted (with parens and hyphen) and
> unformatted and the phone number on the form is OK.  But that input mask
> doesn't work on the output side.
>
> R
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
> Sent: Monday, May 28, 2012 11:31 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Phone Number with optional extension
>
> You mean you want to format it in code and insert it after the phone
> number?
> What format are you trying to use and where is the extension coming from?
> Is it in a separate field or captured as part of the phone number with an
> input mask?
>
> Charlotte Foust
>
> On Mon, May 28, 2012 at 11:09 AM, Rocky Smolin
> <rockysmolin at bchacc.com>wrote:
>
> > Dear List:
> >
> > I need to print a phone number in a report that has an optional
> > extension of up to five characters and can't seem to get the right
> > mask.  I'm inserting the phone number thought code in the Detail
> > Format event as it's part of other text in a letter.
> >
> >
> > Does anyone know how to do this?
> >
> > MTIA
> >
> > Rocky
> >
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
>
>
> >
> >
> > Website: http://www.databaseadvisors.com
>
>
> >
> >
> >
> >
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
>
>
> Website: http://www.databaseadvisors.com
>
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
>
>
> Website: http://www.databaseadvisors.com
>
>
>


More information about the AccessD mailing list