Drew Wutka
DWUTKA at marlow.com
Thu Apr 3 17:09:31 CST 2003
I don't think you can do that 'strictly' in Access, without code of some type. I built a similar db, which lists products of different types. There was a product table (which lists the name and ID of the product), there is a product type table, which lists the product type name and typeid, then there was a product type property table, which lists the properties for each type, and what type of data that property is. Then I had a table for each 'data type' (Text, currency, number, date). My code was setup as classes, that allowed the information for each product to be pulled up by using the data in the various tables. With that structure, ANY product could be stored, if it was a new 'type', you just added the properties for that type and off you go. Drew -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Thursday, April 03, 2003 11:12 AM To: 'accessd at databaseadvisors.com' Subject: [AccessD] One-to-one relationships Hi All, I have four tables, one is the "main" table and the other three are category or type tables with a one-to-one relationship to the "main" table. I want to limit a record that is in the "main" table to exist in only one of the category tables with the flexibility of the record moving, if you will, from one category table to another. For example, if during the creation of a new record the user picks category1 from a combo box, he/she is presented with the fields that are found in the category1 table. If at a later point he/she decides to change the category to category2, the information from category1 would be removed and the user would fill in the information for category2. I have coded this before and everything worked out well, but what I was wondering is if the ability to limiting to one category table could be achieved using some form a relationship rules in Access. Or can this only be accomplished with coding? Thanks! Joe Rojas jrojas at tnco-inc.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com