Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1. Guest ji, please consider donating today!
      Become a Supporter    ::   Make a Contribution   
    Monthly Recurring Target: $300 :: Achieved: $95

Defaul area code

Discussion in 'Information Technology' started by Christian >, Jul 28, 2006.

Tags:
  1. Christian >

    Christian >
    Expand Collapse
    Guest

    I have a phone number field with the input mask:

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

    How can I have a default area code of 615 when you click on the field to
    start entering the number?

    Whenever I set up a default value, it has the value there before I click on
    the field... I want it to stay blank unless someone begins to enter data.
     
  2. Loading...


  3. Wayne-I-M

    Wayne-I-M
    Expand Collapse
    Guest

    Set this to run when your phone number field has the focus - change the
    FieldName and FormName -


    Private Sub FieldName_GotFocus()
    On Error GoTo FieldName_GotFocus_Err
    Forms!FormName!FieldName = 615
    FieldName_GotFocus_Exit:
    Exit Sub
    End Sub


    --
    Wayne
    Manchester, England.



    "Christian ><>" wrote:

    > I have a phone number field with the input mask:
    >
    > !\(999") "000\-0000;;_
    >
    > How can I have a default area code of 615 when you click on the field to
    > start entering the number?
    >
    > Whenever I set up a default value, it has the value there before I click on
    > the field... I want it to stay blank unless someone begins to enter data.
     
  4. Christian >

    Christian >
    Expand Collapse
    Guest

    OK Wayne, I finally got the code to work... Thanks.

    BUT, it places the 615 at the end of the number, like so:

    (___) ___-_615

    Is there a way to set it up so that when the user clicks on the field they get

    (615) ___-____

    and the curser is on the first blank so that they can start typing in the
    rest of the number? Then if they need to change the area code, they have to
    physically highlight it...

    "Wayne-I-M" wrote:

    > Set this to run when your phone number field has the focus - change the
    > FieldName and FormName -
    >
    >
    > Private Sub FieldName_GotFocus()
    > On Error GoTo FieldName_GotFocus_Err
    > Forms!FormName!FieldName = 615
    > FieldName_GotFocus_Exit:
    > Exit Sub
    > End Sub
    >
    >
    > --
    > Wayne
    > Manchester, England.
    >
    >
    >
    > "Christian ><>" wrote:
    >
    > > I have a phone number field with the input mask:
    > >
    > > !\(999") "000\-0000;;_
    > >
    > > How can I have a default area code of 615 when you click on the field to
    > > start entering the number?
    > >
    > > Whenever I set up a default value, it has the value there before I click on
    > > the field... I want it to stay blank unless someone begins to enter data.
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page