M
MarianneZ
I've addressed this question in the reports group, but I have a more general
question.
The ID field in my database uniquely identies a customer. For different
applications in my database I want to the user to supply the info to
determine the ID, either an ID or a last name or a last name and first name.
So I've created a generic form that will determine the ID. I will then use
that ID to populate a report or a form.
My idea was to pass the ID value by storing it in the parent form or report
in a consistently-named unbound field as follows:
Parent!ttxtID.Text = Me!txtCustID.Text
This code would appear in a procedure for the subform.
I've tried this, popping up the subform from a Report_Open and a Report_Load
procedure. It doesn't work. In the debugger inside the subform's code I look
at the local expressions and Me's parent is never properly defined. Plus I
get Run-time error 2185, which says I can't reference a property or a method
for a control unless the control has focus.
This seems to me a common use for a subform. There must be a way of passing
data.
question.
The ID field in my database uniquely identies a customer. For different
applications in my database I want to the user to supply the info to
determine the ID, either an ID or a last name or a last name and first name.
So I've created a generic form that will determine the ID. I will then use
that ID to populate a report or a form.
My idea was to pass the ID value by storing it in the parent form or report
in a consistently-named unbound field as follows:
Parent!ttxtID.Text = Me!txtCustID.Text
This code would appear in a procedure for the subform.
I've tried this, popping up the subform from a Report_Open and a Report_Load
procedure. It doesn't work. In the debugger inside the subform's code I look
at the local expressions and Me's parent is never properly defined. Plus I
get Run-time error 2185, which says I can't reference a property or a method
for a control unless the control has focus.
This seems to me a common use for a subform. There must be a way of passing
data.