Edit record before update in query subform Access VBA -
here 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
used classify different characteristics event see youtube videos, hence, many 1 relation.
i have main form information of tbla
displayed such user_name
, index
. have subform event_tag
field displayed in datasheet view control source query filtering index taking tbla
.
i know in queries can add records typing in blank record @ bottom (if enabled). want able type in new event_tag
record specific index in tbla
. wondering possible programmatically edit record being inserted table before updated?
for example, type in blank record @ bottom of subform defective motor
, use vba code take date_time
computer , index
/user_name
controls in mainform , add complete record, insert tblb
.
i hope enough example show trying do. appreciate feedback if can direct me how solve this, or if there better way.
thanks
use "onbeforeupdate" event subform. within event
txt_date.value = now() txt_username.value = string
and on
Comments
Post a Comment