Jorgitopeter Posted April 29, 2008 Posted April 29, 2008 Please people, it is an SOS post: please tell me what am I doing wrong, because I guess it's a silly thing, but I just can't realize what to do! I have 2 tables: their fields "customer ID" is related... What I want to do is creating (automatically) a record in the 2nd table when I create a record in the first one! I have already check "allow creation... " and "allow deleting...". Is it right? Sorry for bothering you with this kind of things but I cant solve it! Thanks a lot!
MikeyFM Posted April 29, 2008 Posted April 29, 2008 You'll have to create a button that will run a script to create a new record in both tables and set the related record. As far as I know Record/New will only create a new record in the one table.
corn Posted April 29, 2008 Posted April 29, 2008 This depends in part on your interface. If, for example, the two records are related then you can make data entry contingent on the related record's existence. For example, in table A you would create a field "B_ID". In table B you would create a field "ID" with auto-enter options (serial number or a UID using a technique such as that found at Ray Cologon's site). Relate A to B on these two fields, with auto-create turned on for the B record. You can validate the "B_ID" field so it is not empty. Then simply place a field from B that should never be empty (if the record in B can be completely empty, what's the point in requiring its simultaneous creation?) and a record in B will be created as soon as data in that field is entered. Furthermore, because of the validation, the record in A can not be committed until the record in B exists. There are other methods but you may need to be more descriptive before an appropriate solution can be suggested for your particular use case.
Jorgitopeter Posted April 30, 2008 Author Posted April 30, 2008 Thanks for your answer! In this case I redesigned the system, but I'll have your answer in mind for the future! Thanks again.
Recommended Posts
This topic is 6146 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now