Update query - automatically update

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nominoo
    New Member
    • Jan 2010
    • 5

    Update query - automatically update

    Hi all

    I've developed a query in access that updates the value of a field, in relation to the value of another field i.e

    Field one contains a date and the query projects a start date 91 days ahead.

    This works fine, but what i would really like help on is how do I get this update query to work, each time a new entry is added.

    the access database is not going to be available for anyone to run the query, they will be sending the data to the foeld via an excel interface.

    Any help appreciated.

    thanks
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    #2
    Could you explain a bit more?
    There are several ways to do this,and it would depend on what it is your trying to accomplish. Do the users need the new data available from their excel interface? Why not just used DateAdd()?

    Comment

    • nominoo
      New Member
      • Jan 2010
      • 5

      #3
      ....

      Hi Smiley face

      Thanks for replying.

      In excel there is a user form which is used to input details.

      When a date is input excel works out and expected start date and a count down of the number of days until the start date. This information is then transferred over to the access database. My problem occurs as access just holds the data and didn't update the countdown. i need the countdown to work in access as I will be using in to produce reports, so I set up a query which works great it populates the field and contiues the count down, when i manually run the query. However i really do need this to be automated when a new record is sent to the database.

      Any ideas would be great. P.s I am extremely new to access so need an idiots guide!!

      Comment

      • nico5038
        Recognized Expert Specialist
        • Nov 2006
        • 3080

        #4
        Hmm, just wondering why you store this calculated date.
        In a normalized database you just use the calculation when you want to show this date.

        Access doesn't have a way to trigger an update when data is imported into a table, this will have to be done "manually" or by code that's triggered at a certain moment.

        But, as stated before, why store the date when you can calculate it ?

        Nic;o)

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32661

          #5
          This is a very important point (that Nico makes). It is not generally a good idea (worse, it's a bad idea) to store data that can be calculated (For reasons why see Normalisation and Table structures).

          If it were to be required for some obscure reason though, the most straightforward way would be to calculate it within the Excel form and submit it with the other data.

          Comment

          Working...