Form Data Entry

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ye2127
    New Member
    • Jan 2007
    • 8

    Form Data Entry

    Can someone please give me advice on how to do the following in a form?

    In my form I have a have the user enter a 1 or a 2 in a box for the first record.

    I would like to know how I can make every following record contain the number that the user entered for the first record without having the user enter a 1 or 2 ever again.

    I appreciate your help
    -Yan
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    Hi Yan

    If the textbox name was txtValue then in the AfterUpdate event of the textbox you would need to put the value in the Default value of the textbox as follows:
    Code:
    Private Sub txtValue_AfterUpdate()
    
       Me!txtValue.DefaultValue = Me!txtValue.Value
    
    End Sub
    Mary

    Comment

    • ye2127
      New Member
      • Jan 2007
      • 8

      #3
      Hi Mary,
      Can you please clarify? I wrote the code but the values in the text box of the subsequent records to not reflect the first value that was entered. Thank you for you help.

      Comment

      • MMcCarthy
        Recognized Expert MVP
        • Aug 2006
        • 14387

        #4
        Originally posted by ye2127
        Hi Mary,
        Can you please clarify? I wrote the code but the values in the text box of the subsequent records to not reflect the first value that was entered. Thank you for you help.
        It will only work if the subsequent records are new records. If not then you will need something more complicated.

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32633

          #5
          If you can say more clearly exactly what you want then we will see what we can do for you.

          Comment

          • brynne
            New Member
            • Mar 2007
            • 13

            #6
            Originally posted by ye2127
            Can someone please give me advice on how to do the following in a form?

            In my form I have a have the user enter a 1 or a 2 in a box for the first record.

            I would like to know how I can make every following record contain the number that the user entered for the first record without having the user enter a 1 or 2 ever again.

            I appreciate your help
            -Yan
            Sounds like a relationship problem. Without telling us a bit more about the data that you are trying to record, it is a bit difficult to advise you. Are you familiar with the concept of 'normalisation' ? It may be that you need extra/intermediate tables to record the data correctly. You can link all the necessary tables together using a query, then create a form from the query.

            B

            Comment

            • MMcCarthy
              Recognized Expert MVP
              • Aug 2006
              • 14387

              #7
              Originally posted by brynne
              Sounds like a relationship problem. Without telling us a bit more about the data that you are trying to record, it is a bit difficult to advise you. Are you familiar with the concept of 'normalisation' ? It may be that you need extra/intermediate tables to record the data correctly. You can link all the necessary tables together using a query, then create a form from the query.

              B
              B is right.

              Have a look at this tutorial and see what you think?

              Normalisation and Table structures

              Mary

              Comment

              Working...