Welcome to SPN

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

Sign Up Now!

Extracting Part of a Field

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

  1. F1stman

    F1stman
    Expand Collapse
    Guest

    Hello All,
    I am trying to set a statement to set the default value of one text box with
    the last 7 digits of another. For example in field account code box the
    following is diplayed: 1234567890. In the tracking code box I want, 4567890
    to be the default value. I know where to put it, just not sure of the synax.
    Many Thanks, Adam
     
  2. Loading...

    Similar Threads Forum Date
    GURU NANAK IN NORTH WEST FRONTIER PAKISTAN AND SINDH-Part II Hard Talk Jan 3, 2017
    Sikh News US Lawmakers Partake In Sikh Tradition Of 'Langar' On Capitol Hill - Asian Fortune Breaking News Jul 23, 2016
    Sikh Gurus Sikh History Vol 2, Guru Nanak Sahib (Part B) History of Sikhism Jun 26, 2016
    Sikh Gurus Sikh History, Vol 1: Guru Nanak Sahib (Part A) History of Sikhism Jun 26, 2016
    Sikhism Sikhism In Iran – A Part Of Cultural Diaspora Sikh Sikhi Sikhism May 18, 2016

  3. Joseph Meehan

    Joseph Meehan
    Expand Collapse
    Guest

    It is a number type field or a text field?

    --
    Joseph Meehan

    Dia duit
    "F1stman" <F1stman@discussions.microsoft.com> wrote in message
    news:D18EF356-0A6B-402C-8A02-E4980E79A15F@microsoft.com...
    > Hello All,
    > I am trying to set a statement to set the default value of one text box
    > with
    > the last 7 digits of another. For example in field account code box the
    > following is diplayed: 1234567890. In the tracking code box I want,
    > 4567890
    > to be the default value. I know where to put it, just not sure of the
    > synax.
    > Many Thanks, Adam
     
  4. xRoachx

    xRoachx
    Expand Collapse
    Guest

    Hi - Use the Right function: Right([Account Code], 7)

    "F1stman" wrote:

    > Hello All,
    > I am trying to set a statement to set the default value of one text box with
    > the last 7 digits of another. For example in field account code box the
    > following is diplayed: 1234567890. In the tracking code box I want, 4567890
    > to be the default value. I know where to put it, just not sure of the synax.
    > Many Thanks, Adam
     
  5. Michael H

    Michael H
    Expand Collapse
    Guest

    Hi.

    According to Access Help, the Default Value is "a value that is
    automatically entered in a field when a new record is created." I don't
    think this is what you want, because when a new record is created, the Field
    Account Code box would be blank.

    I think what you want here is an unbound text box, for which the Control
    Source should be set to:
    =Right([FieldName],7)
    where "FieldName" is the name of your Field Account Code control.

    -Michael


    "F1stman" wrote:

    > Hello All,
    > I am trying to set a statement to set the default value of one text box with
    > the last 7 digits of another. For example in field account code box the
    > following is diplayed: 1234567890. In the tracking code box I want, 4567890
    > to be the default value. I know where to put it, just not sure of the synax.
    > Many Thanks, Adam
     

Share This Page