Hi
I have a form that collects (contact logging) data that will be saved to two different tables.
Up to now, I have been saving the master info, and then querying the table (using the data I just saved) to retrieve the primary key in order to correctly save the detail, but it strikes me that this is so common there must be a function for it somewhere and I'm being clueless.
Is there a way to automatically tell the detail save to use the primary key from the 'just saved' master info?
Specifically to this problem, after I have saved the details of a contact (phone call, meeting, email etc), I want to save info about who the contact was referred to info in another table using the ID of the contact as a foreign key. Is there an easy way to get this info?
many tia
mcalex
I have a form that collects (contact logging) data that will be saved to two different tables.
Up to now, I have been saving the master info, and then querying the table (using the data I just saved) to retrieve the primary key in order to correctly save the detail, but it strikes me that this is so common there must be a function for it somewhere and I'm being clueless.
Is there a way to automatically tell the detail save to use the primary key from the 'just saved' master info?
Specifically to this problem, after I have saved the details of a contact (phone call, meeting, email etc), I want to save info about who the contact was referred to info in another table using the ID of the contact as a foreign key. Is there an easy way to get this info?
many tia
mcalex