By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,503 Members | 2,730 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,503 IT Pros & Developers. It's quick & easy.

Update query - automatically update

P: 5
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
Feb 1 '10 #1
Share this Question
Share on Google+
4 Replies


TheSmileyCoder
Expert Mod 100+
P: 2,321
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()?
Feb 1 '10 #2

P: 5
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!!
Feb 1 '10 #3

nico5038
Expert 2.5K+
P: 3,072
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)
Feb 2 '10 #4

NeoPa
Expert Mod 15k+
P: 31,186
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.
Feb 2 '10 #5

Post your reply

Sign in to post your reply or Sign up for a free account.