April 29, 200817 yr 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!
April 29, 200817 yr 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.
April 29, 200817 yr 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.
April 30, 200817 yr Author Thanks for your answer! In this case I redesigned the system, but I'll have your answer in mind for the future! Thanks again.
Create an account or sign in to comment