Event procedure for after update of form to enter data into a subf

D

Database User

What is the code for the after update event of a field in the main form to
fill out a record in a subform I began like this but it doesn't work - it
must be a bit wrong

on the after update event of a field in the main form i typed this:

Me.Frm_Sub_Students. [Status_ID] = "NSG"

what is the correct code - please can someone help!
 
W

Wolfgang Kais

Hello "Database User"

Database User said:
What is the code for the after update event of a field in the main
form to fill out a record in a subform I began like this but it doesn't
work - it must be a bit wrong
on the after update event of a field in the main form i typed this:

Me.Frm_Sub_Students. [Status_ID] = "NSG"

what is the correct code - please can someone help!

Try this:
Me.Frm_Sub_Students.Form![Status_ID] = "NSG"
 
D

Database User

it doesnt work what could be the problem?

Wolfgang Kais said:
Hello "Database User"

Database User said:
What is the code for the after update event of a field in the main
form to fill out a record in a subform I began like this but it doesn't
work - it must be a bit wrong
on the after update event of a field in the main form i typed this:

Me.Frm_Sub_Students. [Status_ID] = "NSG"

what is the correct code - please can someone help!

Try this:
Me.Frm_Sub_Students.Form![Status_ID] = "NSG"
 
W

Wolfgang Kais

Hello "Database User".

Database User said:
Wolfgang Kais said:
Database User said:
What is the code for the after update event of a field in the main
form to fill out a record in a subform I began like this but it doesn't
work - it must be a bit wrong
on the after update event of a field in the main form i typed this:

Me.Frm_Sub_Students. [Status_ID] = "NSG"

what is the correct code - please can someone help!
Try this:
Me.Frm_Sub_Students.Form![Status_ID] = "NSG"
it doesnt work what could be the problem?

Frm_Sub_Students must be the name of the subform control, Status_ID must be
a Field of the subform that has the datatype text or memo, if it is text,
then the field size must be at least 3, and the recordsource of the subform
must be updatable.
 
Top