Set 2 fiels to same value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mickyp
    New Member
    • Sep 2006
    • 1

    #1

    Set 2 fiels to same value

    Hi There,

    I have an access database where I would like to set two fields to the same value.
    Both fields are in the same table called Sampletbl

    The one field is called Year and the other Years.

    Is there anyway to get access to populate field year with the same value as field years automatically.

    Thankx
    MickyP
  • PEB
    Recognized Expert Top Contributor
    • Aug 2006
    • 1418

    #2
    Hi,

    The way to do it is to use an Update Query!

    You have to do a new query and in SQL view you type the folling SQL:

    UPDATE [Sampletbl] SET [Sampletbl].Year = [Years];

    And than you press the run sql buton and you run the query!

    Will appear a message that your records will be updated!

    Comment

    • MMcCarthy
      Recognized Expert MVP
      • Aug 2006
      • 14387

      #3
      You don't say where you would like this update to happen. For example, is it during a user entering data on a form, etc.



      Originally posted by mickyp
      Hi There,

      I have an access database where I would like to set two fields to the same value.
      Both fields are in the same table called Sampletbl

      The one field is called Year and the other Years.

      Is there anyway to get access to populate field year with the same value as field years automatically.

      Thankx
      MickyP

      Comment

      Working...