VB subs on Child Forms

sb4216

New member
Local time
Today, 05:50
Joined
Apr 6, 2011
Messages
8
I want to start by saying I am new to Access programming, so please forgive me if my terminology is not correct.

I have 2 tables (master and journal), the Journal table contains a foreign key to the Master table. I have one form that contains a subform (child form that is a datasheet of the journal table).

When users enter into the child form, there is one column that is the same for each record 99% of the time per master record so I would like to default that field value to whatever was entered on the first record in the session to all subsequent records in the datasheet (ie, take the first field value in the subreport and default that value to all the remaining records entered in the subreport).

In order to do that I am sure I need some VB code. However, when I click on the "event procedure" for the child form the only subs I have are "On Enter" and "On Exit". Is there not a way to have any control within the datasheet on the child form on a per record basis?
 
You can do something like this in the after update event of the control (textbox).

http://access.mvps.org/access/forms/frm0012.htm

It sounds like you only clicked once on the subform, which gets you the properties of the subform control. Clicking again should get you the properties of the form itself.
 
Thanks Paul.
 

Users who are viewing this thread

Back
Top Bottom