Solved

access query question

Posted on 2013-02-05
2
309 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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

809 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