473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to Archive Record automatically?

180 100+
How to archive record automatically, i just want record to move in other table automatically when record contains (completed) in field STATUS.
Oct 19 '10 #1

✓ answered by colintis

I think you should read some tutorials on understanding the concepts, as it is difficult to tell you exactly how to do step-by-step.

This tutorial website should help you understand most of the basics, they provide the access tutorial for different versions.

5 1560
colintis
255 100+
You will need 2 queries, and a macro that executes the queries.

1 query appends the record to the table you want to move, and the other one removes that record from the old table.

Hints, use the HAVING clause for checking the status is completed or not.
Oct 19 '10 #2
eneyardi
180 100+
thnx, but how can i do this?
Oct 19 '10 #3
colintis
255 100+
Queries are made of SQL statements, go take a look on some tutorials on how to write SQL.

An example of the 2 queries are below, let say move from table A to B. The first one is copying the records from A to B, then the second one will delete the records in A.
Expand|Select|Wrap|Line Numbers
  1. INSERT INTO TableB
  2. SELECT TableA.*
  3. FROM TableA
  4. HAVING STATUS = 'completed';
  5.  
Expand|Select|Wrap|Line Numbers
  1. DELETE TableA.*
  2. FROM TableA
  3. HAVING STATUS = 'completed';
  4.  
Then for the macro you'll simple select the action of OpenQuery and select the 2 queries in order, and ending it by selecting the StopMacro action.
Oct 19 '10 #4
eneyardi
180 100+
where can i put this code?
Oct 19 '10 #5
colintis
255 100+
I think you should read some tutorials on understanding the concepts, as it is difficult to tell you exactly how to do step-by-step.

This tutorial website should help you understand most of the basics, they provide the access tutorial for different versions.
Oct 19 '10 #6

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

Similar topics

3
by: Henro V | last post by:
I made this table in which we registrate our working hours It is in fact quite simple: DayOfTheWeek Date StartTime Endtime Lunch Travel ... ... ... Total WorktimeThisDay This would look...
6
by: Nothing | last post by:
I have a form that opens. On this form there is information along with a button that opens a payment form. The payment form opens and I enter a payment type, cash check or charge, a payment...
6
by: HD | last post by:
Hello. For the following, I would appreciate if anyone could tell me: if it can be done, how it might done, and/or what search terms I could use to find the solution myself. I would like to...
1
by: Moch | last post by:
I have the following problem. I have two tables that are related. One tabel is contacts and the other is projects. Both tables are filled via a form. On the contacts-form i have a button "add...
1
by: planetthoughtful | last post by:
Hi All, I have a mainform with a subform in which I show some task summary data. On the mainform I have a number of unbound controls that reflect values relevant to each task in the subform....
6
by: kaosyeti | last post by:
hey.... i have a duplicate record issue i could use some help with. on a form that has 2 unbound controls, txtboxyear and cboxmonth, together will automatically fill in an invisible txtboxdate...
1
by: Ryker | last post by:
I have a lengthy form containing several fields of data. Each record that is entered is given a record identification number. Sometimes the user gets midway into the form and has to stop to...
4
by: Richard McBrown | last post by:
Hi Guys Here's a quandry I could do with some help on please... {I'm using Access 2002 SP3 on XP SP2} I have 2 tables and . They're linked via a 1-to-1 relationship on field . I want...
3
by: Murlan | last post by:
Hello everyone, I need help regarding a couple of issues. I have completed a cute and very functional database for a friend who owns a local gym -> mainly for tracking and managing clients etc....
9
by: Aric Green | last post by:
I have a customer information table that contains an autonumber field called ID NUMBER that is the primary key. The table also contains name, address, etc. I have 5 other tables that will be used...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.