Copy records

N

nicksbackwoods

I have a table, used somewhat like a schedule. I would like to create a
record and then have a command to create duplicate records with different
dates. Like setting up recurring appointments in Outlook. Any help on how to
accomplish????
 
J

John Vinson

I have a table, used somewhat like a schedule. I would like to create a
record and then have a command to create duplicate records with different
dates. Like setting up recurring appointments in Outlook. Any help on how to
accomplish????

An appropriate Append query would work; without knowing the structure
of your table or how you determine the desired dates I can't suggest
what that query would look like, though.

John W. Vinson[MVP]
 
N

nicksbackwoods

I am having a difficulty with the primary key, it is not an autonumber. As
far as replication I am using a 7 day advancement, Wednesday to Wednesday,
maybe 10 weeks in the future.
 
J

John Vinson

I am having a difficulty with the primary key, it is not an autonumber.

Well, what IS the Primary Key? I obviously can't describe how to
create it if I don't know what it is!

What have you tried (post the SQL) and what specific problem are you
having?
As far as replication I am using a 7 day advancement, Wednesday to Wednesday,
maybe 10 weeks in the future.

So... you want to create 10 records one for each upcoming Wednesday?

One way is to make use of an auxiliary table. All my databases contain
a small table named Num, with one primary key long integer field N;
it's prefilled (using Excel fill-down and copy and paste, the first
time I built it) with values 0 through 10000.

You can use this as the source of an Append query. If you want to
append 10 rows, use a criterion on N of <10. You can then use

DateAdd("d", 7*[N], [Enter start date:])

to generate ten weeks' worth of dates. The other fields in your append
query are up to you, since I obviously don't know what they should
be...

John W. Vinson[MVP]
 
Top