A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Input Masks



 
 
Thread Tools Display Modes
  #1  
Old October 29th, 2004, 04:43 PM
mk2
external usenet poster
 
Posts: n/a
Default Input Masks

My database contains many tables which in turn contain many phone number
fields. I have created separate fields to house US/Canada numbers versus
international numbers. The international number fields do not contain any
input masks or formatting requirements. So the user is expected to enter that
during input. (99% of the numbers entered in this database will be US/Canada
and no record will contain both a US/Canada and an international number). For
the US/Canada number fields, I can set the input mask in the table to be
either:

!\(999") "000\-0000;0;_

Or

!\(999") "000\-0000;;_

I have a couple of questions:

1. Is it correct that if I use !\(999") "000\-0000;;_ , I am storing only
the digits and not the parentheses and hypens?

2. If I need to use this data in a mail merge Microsoft Word document, will
the second option not contain any formatting; and therefore, would it be
better to use the first option even though it required more space in the
database?

3. On my Access reports, I have concatenated the US/Canada number and the
international number to conserve space on the report. (Perhaps this would
have been better done with If statements, but I am not familiar with those.)
This results in whichever number is present being printed. With this
concatenated field, should the Input Mask Property be blank for this field on
this report? Will the formatting for the US/Canada number come through
anyway, even if the Input Mask Property is blank?

Thanks in advance for any help.
  #2  
Old October 31st, 2004, 08:52 PM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Fri, 29 Oct 2004 08:43:01 -0700, mk2
wrote:

My database contains many tables which in turn contain many phone number
fields. I have created separate fields to house US/Canada numbers versus
international numbers. The international number fields do not contain any
input masks or formatting requirements. So the user is expected to enter that
during input. (99% of the numbers entered in this database will be US/Canada
and no record will contain both a US/Canada and an international number). For
the US/Canada number fields, I can set the input mask in the table to be
either:

!\(999") "000\-0000;0;_

Or

!\(999") "000\-0000;;_

I have a couple of questions:

1. Is it correct that if I use !\(999") "000\-0000;;_ , I am storing only
the digits and not the parentheses and hypens?


Yes. If you put a zero between the semicolons it will store the
punctuation; leave it blank and it won't.

2. If I need to use this data in a mail merge Microsoft Word document, will
the second option not contain any formatting; and therefore, would it be
better to use the first option even though it required more space in the
database?


That's a tossup. I'll usually store just the numbers and create a
Query using the Format() function to cast the number into a string:

ExpPhone: Format([phone], "\(@@@\) @@@-@@@@")

Just setting the Format property or a mask will not help with exports,
you do need the explicit casting.

3. On my Access reports, I have concatenated the US/Canada number and the
international number to conserve space on the report. (Perhaps this would
have been better done with If statements, but I am not familiar with those.)
This results in whichever number is present being printed. With this
concatenated field, should the Input Mask Property be blank for this field on
this report? Will the formatting for the US/Canada number come through
anyway, even if the Input Mask Property is blank?


For this you will CERTAINLY need the Format() function. You can use an
expression such as

IIF(IsNull([NAPhone]), [INTLPhone], Format([NAPhone], "\(@@@\)
@@@-@@@@")

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
input masks Zariah General Discussion 1 October 3rd, 2004 06:22 AM
Input masks not being displayed jfischer_5809 General Discussion 1 September 8th, 2004 05:41 PM
Input masks and (non) duplicate values PeterC Database Design 1 June 10th, 2004 09:59 PM
Input Masks Jackie Worksheet Functions 2 February 5th, 2004 10:08 AM


All times are GMT +1. The time now is 08:40 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.