Here is what I have:
Two tables:
tblA
:Index
,Date_Time
,User_Name
,Event
,Product_Serial_Number
tblB
:tblA_Index
,Date_Time
,User_Name
,Event_Tag
The field Event_Tag
is used to classify different characteristics about the event like what you would see with YouTube videos, hence, the many to one relation.
I have a main form with the information of tblA
displayed such as the User_Name
and index
. I have a subform with only the Event_Tag
field displayed in a datasheet view whose control source is a query filtering by only the index taking from tblA
.
I know in queries you can add records by typing in the blank record at the bottom (if it is enabled). I want to be able to type in a new Event_Tag
record for the specific index in tblA
. I am wondering it is possible to programmatically edit the record being inserted into the table before it is updated?
For example, I type in the blank record at the bottom of the subform Defective Motor
and then use a vba code to take the date_time
from the computer and the index
/User_Name
from the controls in the mainform and add it to complete the record, then insert it into tblB
.
I hope this is a good enough example to show what I am trying to do. I appreciate the feedback if anyone can direct me how to solve this, or if there is a better way.
Thanks