If the Members_Numbers and the Members_Info tables have a 1 to 1 relationship, you can create a view that combine the 2 tables joined with the Member_Number key and make every fields updatable. When adding a record, call the routine that generate the next Member_Number from your app (I suppose that the default value of the Member_Number field call this routine) and save this number to both fields in the view.
If you do not have a 1 to 1 relationship, then you need to add the record in the Members_Numbers table first, get the current record Member_Number value and add as many record you need in the Members_Info table. Note that getting the last record will fail in a multi-user scenario if another user has inserted a new record before you had the chance of getting the field value. The record pointer should be on the new record after an insert.
Then again, if you have a 1 to 1 relationship, that bring up the question: why not combining the 2 tables into one?
May I ask what is bothering you about having to do these steps to save your records?
>Thanx! But How can I do this? With Inner Join?
>Let me explain a little bit..
>
>I have a table Named Members_Numbers who will create an automatic number, save password, AccesLevel and the email and another one named Members_Infos who will contain others informations about the members...(Street adress, etc..)
>
>The number created automaticaly will be the member number.. I need it to add the others info in Members_Infos. A relation is set between Members_Number and Members_Infos with the Memer_Number fields...
>
>So.. when the user push the submit button, I have to insert informations in two tables... I found how with an Inster in Members_Numbers, select the last record of Members_Number then get the Number and another insert in Members_Infos.. Then 3 query to add :((
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only