Solved

access query question

Posted on 2013-02-05
2
280 Views
Last Modified: 2013-02-05
Hi. If I have a simple access table with three fields. these being:
New date
Old date
Frequency.

And I want to update the fields so the new date becomes the old date then the new date gets updated bu adding the frequency to the date and this is stored in the New date field.
How would this be done?
I can make a update query that will update the new date with the new date+ frequency and I can make a similar query with Old date = New Date. but how do I do this in one operation?
0
Comment
Question by:PawloA
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 38856234
update tableName
set [New Date]=[Old date] + [Frequency]

or

update tableName
set [New Date]=DateAdd("d" , [Frequency], [Old date])
0
 
LVL 77

Expert Comment

by:peter57r
ID: 38856261
Update table set OldDate = NewDate, NewDate = NewDate + Frequency
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now