Solved

access query question

Posted on 2013-02-05
2
322 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

728 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