If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
Validate information
Hi Again,
I thought I did. By creating the relationship between the the 2 tables and having checked off referential integrity relationship type one-to-many gives me an error message of 'You cannot add or change a record because a related record is required in 'table2'. -----Original Message----- Go back to my first reply. Do you understand how to create relationships between tables? -- Duane Hookom MS Access MVP wrote in message ... Table one base licese # is the primary. The dbase license # in table two is the same. I would like to create a way by which the user could not enter information for anyone if the dbase license does not exist in table one base license #. Joseph -----Original Message----- Your fields don't exactly match with your early post. Regardless, how are the tables related? My example suggested which field value in table2 is related to the primary key of table1. -- Duane Hookom MS Access MVP wrote in message ... Thanks for the help. TableOne ========== Base license # Text Primary Company Name Text group name Text TableTwo ========= dbase licence # text t license # text t license exp date/time first name text last name text Thanking you again for all your help. Joseph -----Original Message----- Reply to the group and type in something like: tblTableA ================= FieldA Numeric Primary Key FieldB Text FieldC Date FieldD Text tblTableB ================= Field1 Numeric Primary Key FieldA Numeric Foreign Key to tblTableA.FieldA Field3 Date Field4 Numeric -- Duane Hookom MS Access MVP wrote in message ... This may sound st*&*()) but how do I provide it? -----Original Message----- Could you provide your table structures and which are the primary and foreign keys? Which table can't you enter records into? -- Duane Hookom MS Access MVP wrote in message ... Thanks, I tried this but I have a problem. It will not allow me to add any records because a related record is required where the field is a primary key. Any help? Thanks Again -----Original Message----- Licence Number in the first table should be a primary key. You can then set your relationships to enforce referential integrity. -- Duane Hookom MS Access MVP "Joseph" wrote in message news:193301c47bef$65a5ee70 ... I have a table with 3 fields licence number = 6 characters / name of license holder & address off licence holder. The second table are individuals who may operate under those license numbers in the first table. My question is can I validate or restrict the information entry into the second table with only valid license numbers that exist in the first field of table one? Any help would be greatly appreciated. . . . . . |
#12
|
|||
|
|||
Validate information
Remove any relationships by clicking any join lines and pressing the delete
key. Then grab and drag the primary key from your one table (it should be bold) and drop it on the similar field in your second table. Set the join property to enforce referential integrity. If this can't be accomplished due to records in table two that don't have a matching record in table one then either add the record to table one or delete the record(s) from table two. -- Duane Hookom MS Access MVP wrote in message ... Hi Again, I thought I did. By creating the relationship between the the 2 tables and having checked off referential integrity relationship type one-to-many gives me an error message of 'You cannot add or change a record because a related record is required in 'table2'. -----Original Message----- Go back to my first reply. Do you understand how to create relationships between tables? -- Duane Hookom MS Access MVP wrote in message ... Table one base licese # is the primary. The dbase license # in table two is the same. I would like to create a way by which the user could not enter information for anyone if the dbase license does not exist in table one base license #. Joseph -----Original Message----- Your fields don't exactly match with your early post. Regardless, how are the tables related? My example suggested which field value in table2 is related to the primary key of table1. -- Duane Hookom MS Access MVP wrote in message ... Thanks for the help. TableOne ========== Base license # Text Primary Company Name Text group name Text TableTwo ========= dbase licence # text t license # text t license exp date/time first name text last name text Thanking you again for all your help. Joseph -----Original Message----- Reply to the group and type in something like: tblTableA ================= FieldA Numeric Primary Key FieldB Text FieldC Date FieldD Text tblTableB ================= Field1 Numeric Primary Key FieldA Numeric Foreign Key to tblTableA.FieldA Field3 Date Field4 Numeric -- Duane Hookom MS Access MVP wrote in message ... This may sound st*&*()) but how do I provide it? -----Original Message----- Could you provide your table structures and which are the primary and foreign keys? Which table can't you enter records into? -- Duane Hookom MS Access MVP wrote in message ... Thanks, I tried this but I have a problem. It will not allow me to add any records because a related record is required where the field is a primary key. Any help? Thanks Again -----Original Message----- Licence Number in the first table should be a primary key. You can then set your relationships to enforce referential integrity. -- Duane Hookom MS Access MVP "Joseph" wrote in message news:193301c47bef$65a5ee70 ... I have a table with 3 fields licence number = 6 characters / name of license holder & address off licence holder. The second table are individuals who may operate under those license numbers in the first table. My question is can I validate or restrict the information entry into the second table with only valid license numbers that exist in the first field of table one? Any help would be greatly appreciated. . . . . . |
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
display information based on cell input | jlm661 | General Discussion | 1 | July 30th, 2004 01:19 PM |
You do not have exclusive access... ERROR | Robin | General Discussion | 1 | July 6th, 2004 01:18 AM |
Contact information not being displayed | JEV | Contacts | 1 | June 14th, 2004 10:24 PM |
Publisher 2003 hotfix package Update (KB 838901) | Brian Kvalheim - [MSFT MVP] | Publisher | 0 | May 7th, 2004 08:38 PM |
information analysis | Mike Aiken | Worksheet Functions | 1 | May 7th, 2004 01:47 PM |