Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 27th, 2004, 01:31 PM
Registered User
 
Join Date: Feb 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Table Autonumber Update

I am setting up a database and the client wants and autonumber generated as the main search key and [u]have it updated in other tables upon generation. </u> I researched that setting up referential integrity will not work. Are there any other suggestions besides possibly creating an append query in a macro to run when an autonumber is generated????

 
Old February 27th, 2004, 02:39 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What do you mean by "have it updated in other tables upon generation"?

Clive Astley
 
Old February 27th, 2004, 04:23 PM
Registered User
 
Join Date: Feb 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Appended to other tables. I will have several tables.

Say Item# is autonumber in the Items table. I need for it to show in the Customer and Contact table also.

 
Old February 27th, 2004, 04:33 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think you are referring to referential integrity. Please be completly clear on your explanation.



Sal
 
Old February 27th, 2004, 04:54 PM
Registered User
 
Join Date: Feb 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I can't get any clearer. I said in my first post that referential integraty will not update other tables with an autonumber that is generated in the orginal table.

I looking to see if anyone has any other ideas besides using queries to append the autonumber in the original table such as the Items Table to the Customer and Contact table.

 
Old February 27th, 2004, 05:02 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you have it as an autonumber in table1, then in related table2 it cannot be an autonumber field. Specify it as a number field and it will update accoridingly when you run your update query (or whatever process you are using).

Regards,

Beth M
 
Old February 27th, 2004, 05:19 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 126
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Howdy!
You may give this a thought...I takes care of what I needed it to do for my RFQ database.
Create your two (or more) tables. Have table1 have the autonumber field. Have table2 have the exact same name for a field, but leave it as a number. Create a one-to-many relationship on your autonumber field that has all records from table1 and only those records in table2 that have the same value. Then create a query with all the items except the like field from table2 and only the autonumber field from table1. Then create your form for table2 off the query instead of the table. It will have the records there for you to fill out, but it won't write them to table2 until you have added something to one of the fields from table2.
I hope this is what you are looking for. It's not often I get to supply the help....usually it is all of you answering my questions!:D

Regards,
Laura

The only thing standing between you and your goal is doubt. Quit doubting yourself and you'll be able to accomplish anything!
 
Old February 27th, 2004, 06:48 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It is not that I like to pick on people. With this in mind I must ask again. Please be more clear. Beth is correct with what she mentions. Now, are you trying to set-up a one to one relationship? It sounds to me that this is the case. I have had a client ask me this exact question.


Is that what you are trying to do?







Sal





Similar Threads
Thread Thread Starter Forum Replies Last Post
update table from another db table timbal25 SQL Server 2005 3 January 19th, 2008 06:47 AM
Retrieve Autonumber field and update it carrie09 Access VBA 3 November 2nd, 2007 07:32 AM
Update one table to another table using DTS in SQL Printmaker SQL Language 0 July 24th, 2007 07:17 AM
update table with an ID Num from different table scoobie PHP How-To 12 January 25th, 2005 12:28 PM
Update parent table with the sum of child table gbrown SQL Language 2 November 9th, 2004 07:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.