Macro to duplicate data

ggoosen

New member
Local time
Today, 05:04
Joined
Jul 24, 2006
Messages
7
Hi Guys

I have a quick question?
In MS Access i have a need to do the following

I have one table that has and ID column and a Date Column
so something like this

Table1
=============
Id : AutoNumber
Date : Text

what i need to do is create some sort of macro that will do the following

when a new row is inserted on Table1 i need to create a duplicate of that row in Table2, as well as in table2 i need to save the date as Date Type rather than a Text type..

Please let me know if anyone can do this or if it is even possible.
 
Since Access does not support triggers, you need to handle this manually.
I would create one or more queries to move the data (append) and in the update event run a macro that runs the queries
 
Query

OK
So whaat would the queries be and how would i create the macro.. also i dont have an on update trigger...
is there any way that i can create a "listerner" for when something is inserted into the row.
 
First, how is "something" inserted into the row?
 
The rows are inserted by a third party system which is used for a access control clock.. it writes to the access file and i have no control over that..

my need is to write an applicatin that manipulates the data for a report (my application is a java application)... i cannot do that becuase the date field is a text field..

if i change the date field from Text type to Date type my system will work but the 3rd party software no longer inserts into the DB....

So my idea was to clone the tables that they are always syncronized the only differnece is the table that i utilize for my application uses the table with the date columns as a date type...

i hope this is enough..
 
You need an insert trigger, which Access does not support.
How ever even if the date is in a text format, you can convert it in a query via the use of cdate([text date field]) in a query and use the original tables. Or if you want to use alternate tables, just wipe out, and repopulate your alternate tables each time you intend to use it.
 
Hi Fofa

I have the data in the tables as desired now...


i am just looking for a way to retireve the data via the query?
 

Users who are viewing this thread

Back
Top Bottom