Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add records via a query

Status
Not open for further replies.

fredk

Technical User
Jul 26, 2001
708
0
0
US
HI - I currently have a table called "merged leads" - In this table, I have data about leads. The primary key is the "record number" I have another table that tracks the status of each lead - the table is called "tblProspectStatus" The fields in this table are a record number field (that is linked to the record number in the "merged leads" table) a "date" field and a "status" field

The tblprospectstatus table is used to track the history of the lead.

Because I had to import an additional 800 records, I added a "current client?" field (a yes/no field) to the "merged leads" table. All of the records that were one of our clients, I selected as true for this field.

Now, I want to update the tblprospectstatus to add a record to each record number where this check box is true.

I will need to put todays date in the date field and "current client" in the status field.

I hope that all makes sense. Thanks for any advice!!!!!

Fred

 
I'm a little confused on the specifics but can start you on your way towards getting it done. What you want is an UPDATE query. This will allow you to specify which records need to be updated, along with what information needs to go into the appropriate fields.
To make an UPDATE query, just open a new query and from the menu, select QUERY | UPDATE QUERY. If your intention is to create NEW clients to your existing list, the select QUERY | APPEND QUERY and the records will be ADDED to the ones already in the table. Hope this helps.

Michael
BASD IS/IT Dept
 
Thanks for responding -I actually figured it out - My problem was my original data had a record number as the primary key - I wanted to add an additional 800 records. I needed to get the record number field to pick up where the old records left off - In other words, the original data had 1000 records and the record numbers were 1 through 1000 - When I added another 800 records I needed the record number to be 1001 through 1800.

Thanks!!!

Fred
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top