Charlotte Foust
charlotte.foust at gmail.com
Mon May 28 23:50:50 CDT 2012
I suppose you could try Format$([telephonefield], "(999) 999-9999 #"). That assumes you always have the telephone number and you may have a numeric extension. Charlotte Foust On Mon, May 28, 2012 at 8:25 PM, Rocky Smolin <rockysmolin at bchacc.com>wrote: > Code. I was hoping for a format string. But if I hafta...I'll parse. :( > > 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 4:38 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Phone Number with optional extension > > OMG, deliver me from legacy systesm! If you always have an area code, just > parse out the rest of the string with the Mid function then and apply the > formatting to that. Are you trying to do this in code or in the > contolsource of the report control? > > Charlotte Foust > > On Mon, May 28, 2012 at 4:33 PM, Rocky Smolin <rockysmolin at bchacc.com > >wrote: > > > That would be too easy. :) > > > > The extension is right there in the text field with the phone number. > > (Legacy system...) > > > > 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 3:07 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Phone Number with optional extension > > > > 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 > > > > > > > > > > > > > > > > > -- > > 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 > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > >