Add Record from form into two tables

M

meileigh

I have a form (frm_Invoice) that records phone serial # from customers. I
want to create a new record in both the tbl_Inventory and
tbl_Inventory_Detail when someone scans in a DEC_SN into the frm_Invoice.
The issue I am running across is that the tbl_Inventory_Details has a child
relationship to the tbl_Inventory. I chose this set up because most of the
inventory is manually entered from shipments received from a warehouse. I
created a form and sub form for the inventory tying the SN_ID from each table
on a one to many relationship.

I do not know how to update both tables at once. I tried appending the data
from the form into the tbl_Inventory_Detail but since it is a child it will
not allow me to save the record.

tbl_Inventory has these fields:
SN_ID - Autonumber PK
Order_ID – Text – this is an identifier to tie the shipments or invoices
Receive_Date - Date
TimeStamp_In - Time

The tbl_Inventory_Detail has these fields:
SN_ID – Number: Linked to tbl_Inventory
Receive_Date – Date: updated from tbl_Inventory
TimeStamp_In – Time: updated from tbl_Inventory
DEC_SN - Text – PK

The tbl_Invoice (frm_Invoice) has these fields:
DEC_SN_IN – Text: This is the serial # from the customer
Date – Date: Date invoice was created
TimeStamp – Time: Time invoice was created
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top