Welcome to SPN

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

Sign Up Now!

Automate data entry

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

  1. Chi

    Chi
    Expand Collapse
    Guest

    Hi,

    I have a form that has many text boxes- Month/ Year, Full Name, Year,
    Quantity, Reason and Initials.

    I wanted after entering 05/06 in the MONTH/YEAR text box, The YEAR text box
    will display 1/1/06.

    Likewise, after entering 08/07 in the MONTH/YEAR text box, The YEAR text box
    will display 1/1/07 or 2007.


    (The month in the MONTH/YEAR text box will be change from 01 to 12 since
    there are 12 months in a year).


    Thank you
    Chi
     
  2. Loading...


  3. schasteen

    schasteen
    Expand Collapse
    Guest

    You do not need to store the data twice. If you would use a date field, you
    then can use the format fuction to display the date however you would like.

    "Chi" wrote:

    > Hi,
    >
    > I have a form that has many text boxes- Month/ Year, Full Name, Year,
    > Quantity, Reason and Initials.
    >
    > I wanted after entering 05/06 in the MONTH/YEAR text box, The YEAR text box
    > will display 1/1/06.
    >
    > Likewise, after entering 08/07 in the MONTH/YEAR text box, The YEAR text box
    > will display 1/1/07 or 2007.
    >
    >
    > (The month in the MONTH/YEAR text box will be change from 01 to 12 since
    > there are 12 months in a year).
    >
    >
    > Thank you
    > Chi
    >
     
  4. Chi

    Chi
    Expand Collapse
    Guest

    Hi schasteen,
    Thanks for your response. However, I do need to store the data like that
    way. Do you have any ideas.
    Thanks
    Chi Huynh

    "schasteen" wrote:

    > You do not need to store the data twice. If you would use a date field, you
    > then can use the format fuction to display the date however you would like.
    >
    > "Chi" wrote:
    >
    > > Hi,
    > >
    > > I have a form that has many text boxes- Month/ Year, Full Name, Year,
    > > Quantity, Reason and Initials.
    > >
    > > I wanted after entering 05/06 in the MONTH/YEAR text box, The YEAR text box
    > > will display 1/1/06.
    > >
    > > Likewise, after entering 08/07 in the MONTH/YEAR text box, The YEAR text box
    > > will display 1/1/07 or 2007.
    > >
    > >
    > > (The month in the MONTH/YEAR text box will be change from 01 to 12 since
    > > there are 12 months in a year).
    > >
    > >
    > > Thank you
    > > Chi
    > >
     
  5. Joseph Meehan

    Joseph Meehan
    Expand Collapse
    Guest

    Chi wrote:
    > Hi,
    >
    > I have a form that has many text boxes- Month/ Year, Full Name, Year,
    > Quantity, Reason and Initials.
    >



    Note: I would usually advise against having a field for Full Name. It
    is much better to keep the name as (FName; Mname and Lname) Three different
    fields. From that you can pull out initials if you like or put together the
    name in any form you like or sort and or search any part of the nane, from
    just those fields.

    This follows the same idea of not saving the month when you already have
    a field that includes the month.


    --
    Joseph Meehan

    Dia duit
     
  6. schasteen

    schasteen
    Expand Collapse
    Guest

    Is your filed a date field? If so in the after update event of the
    Month/Year field put
    Me![Year] = format(Me![Month/Year],"YYYY")
    or
    Me![Year] = year(Me![Month/Year])

    See, you do not need to store this data twice since you could put the
    experssions in the control source of the year control. You can also use
    these expressions in queries and anywhere else you would need it.

    If you are storing it as text, you could do like Joseph suggest and just
    have a month field and a year field.

    "Chi" wrote:

    > Hi schasteen,
    > Thanks for your response. However, I do need to store the data like that
    > way. Do you have any ideas.
    > Thanks
    > Chi Huynh
    >
    > "schasteen" wrote:
    >
    > > You do not need to store the data twice. If you would use a date field, you
    > > then can use the format fuction to display the date however you would like.
    > >
    > > "Chi" wrote:
    > >
    > > > Hi,
    > > >
    > > > I have a form that has many text boxes- Month/ Year, Full Name, Year,
    > > > Quantity, Reason and Initials.
    > > >
    > > > I wanted after entering 05/06 in the MONTH/YEAR text box, The YEAR text box
    > > > will display 1/1/06.
    > > >
    > > > Likewise, after entering 08/07 in the MONTH/YEAR text box, The YEAR text box
    > > > will display 1/1/07 or 2007.
    > > >
    > > >
    > > > (The month in the MONTH/YEAR text box will be change from 01 to 12 since
    > > > there are 12 months in a year).
    > > >
    > > >
    > > > Thank you
    > > > Chi
    > > >
     
  7. Chi

    Chi
    Expand Collapse
    Guest

    Hi Joseph and schasteen,
    Thank you so much for your advises.
    Chi

    "Joseph Meehan" wrote:

    > Chi wrote:
    > > Hi,
    > >
    > > I have a form that has many text boxes- Month/ Year, Full Name, Year,
    > > Quantity, Reason and Initials.
    > >

    >
    >
    > Note: I would usually advise against having a field for Full Name. It
    > is much better to keep the name as (FName; Mname and Lname) Three different
    > fields. From that you can pull out initials if you like or put together the
    > name in any form you like or sort and or search any part of the nane, from
    > just those fields.
    >
    > This follows the same idea of not saving the month when you already have
    > a field that includes the month.
    >
    >
    > --
    > Joseph Meehan
    >
    > Dia duit
    >
    >
    >
     

Share This Page