G
Guest
I am attempting to use the subform's 'Form_BeforeInsert' event to trigger code
The BeforeInsert event appears to be a safe place to set values, in a new
record, without triggering other events…
Fact Pattern:
Who makes each call needs to be included in each record added to the table.
The application requires the user to enter their ID at strart up. This ID is
stored in a variable Dim ensioned in a module named 'GlobalMod' as
'Public strCallerName As String' .
The Parent form's name is 'CallList'
The SubFormControl name is 'CallsSubform'
The Source Object is ' CallsSubform'
The Subform's name is CallsSubForm
QUESTIONS:
1) Will code in a Form work the same when it is running as a SubForm?
2) What is the syntax when I want to set the value of the Table.Field
named 'CalledBy', which is attached to a textBox named 'txtCalledBy' in the
subform which is in the DataSheet mode?
i.e. : If the subForm was NOT a DataSheet I could say:
TxtCalledBy.Text = strCallerName
to insert the users ID into the tenth field of the datasheet. (with 1 being
the first field in the table with a total of 10 fields)
Thanks for you help
The BeforeInsert event appears to be a safe place to set values, in a new
record, without triggering other events…
Fact Pattern:
Who makes each call needs to be included in each record added to the table.
The application requires the user to enter their ID at strart up. This ID is
stored in a variable Dim ensioned in a module named 'GlobalMod' as
'Public strCallerName As String' .
The Parent form's name is 'CallList'
The SubFormControl name is 'CallsSubform'
The Source Object is ' CallsSubform'
The Subform's name is CallsSubForm
QUESTIONS:
1) Will code in a Form work the same when it is running as a SubForm?
2) What is the syntax when I want to set the value of the Table.Field
named 'CalledBy', which is attached to a textBox named 'txtCalledBy' in the
subform which is in the DataSheet mode?
i.e. : If the subForm was NOT a DataSheet I could say:
TxtCalledBy.Text = strCallerName
to insert the users ID into the tenth field of the datasheet. (with 1 being
the first field in the table with a total of 10 fields)
Thanks for you help