Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / July 2006

Tip: Looking for answers? Try searching our database.

Append query to same table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick - 24 Jul 2006 22:20 GMT
Hey!

This must be easy, but I can't find it nor figure it out.  

I have a database with addresses in it.  When I change an address [even a
small part of it] I need to mark the old record as obsolete with a date and
create a new record, sometimes almost identical to the old one and modify it.
To make it easier, I am sent only the changed fields in excel. :-)  

I have got all of this down, except how do I append 5 duplicate records
[with an auto number index field] for me to run an update query on?  

The process as I see it is to add five dup records [append query], mark the
original records as obsolete [update query] and alter the duplicated records
with the minor changes [update query].

Thank you!
Michel Walsh - 25 Jul 2006 14:33 GMT
Hi,

why touching existing records? their date (date_time value) will indicate
they are not the most recent anyhow, if a new one is in the database. To get
only the most recent records, take any of the four methods in
http://www.mvps.org/access/queries/qry0020.htm), and that automatically take
"un-care" of the old records, without any need to "mark" them as obsolete..
since they implicitly are, due to their date being older than the date of
another record.

Hoping it may help,
Vanderghast, Access MVP

> Hey!
>
[quoted text clipped - 17 lines]
>
> Thank you!
Patrick - 25 Jul 2006 21:44 GMT
Mike,

Thank you!  

My problem is not one of being able to distinguish old from new records - it
is one of adding 150 almost identical records to a database.  My hope was I
could use some sort of append query after isolating which records would be
almost duplicated and then an update query on the same record set to make the
minor changes.  

I can accomplish all of this except create an append query which appends
copies of the 150ish records with new auto number fields to the database.  

Am I making sense?  LOL.  I have roughly 150 addresses which need changes
like Street being changed to St.  And I need to keep the old records for
history.  So I thought I'd append copies of the 150ish records, and use a
variety of update queries to make the changes [to the fresh copied records].  
I just can't figure out how to create an append query that copies existing
records in a file and appends them to the end of the database.  

Thanks!

Patrick

> Hi,
>
[quoted text clipped - 30 lines]
> >
> > Thank you!
John Vinson - 25 Jul 2006 23:17 GMT
>I just can't figure out how to create an append query that copies existing
>records in a file and appends them to the end of the database.

Well, create an append query based on your table, and when asked what
table to append to, name the same table.

You just can't include the Primary Key in the append query (or the
records will be rejected for violating the unique key). If you have an
autonumber primary key, simply don't include it in the fields that you
select to append.

                 John W. Vinson[MVP]
Patrick - 31 Jul 2006 22:55 GMT
Ok.  I'm embarassed by this one.  No wonder I couldn't find it anywhere.  
It's too stupid.

Thank you!

> >I just can't figure out how to create an append query that copies existing
> >records in a file and appends them to the end of the database.
[quoted text clipped - 8 lines]
>
>                   John W. Vinson[MVP]    
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.