Patrick O'Dea
asked on
Referring to a Control on a PARENT form
See form frmPriceFind
In design mode you will notice two RED fields.
My objective is for these 2 red fields to BOTH show the field CostPrice.
The red field on the subform does not work!
me.Parent!CostPrice
How do I refer to the [CostPrice] on the parent form.
DerekImport--2-.zip
In design mode you will notice two RED fields.
My objective is for these 2 red fields to BOTH show the field CostPrice.
The red field on the subform does not work!
me.Parent!CostPrice
How do I refer to the [CostPrice] on the parent form.
DerekImport--2-.zip
ASKER
Thank,
I am not quite there yet.
See attached.
I did what I thought you suggested but the form (frmPriceFind) crashes as you scroll through the records.
DerekImport.zip
I am not quite there yet.
See attached.
I did what I thought you suggested but the form (frmPriceFind) crashes as you scroll through the records.
DerekImport.zip
You've bound the "CostPrice" textbox to a field named "CostPrice", and that field is not in the Recordsource of your subform. You'll have to bind that control to a Field that is present in the Recordsource of your subform.
BTW: I'm referring to the CostPrice textbox on the SUBFORM. In other words, you've bound the CostPrice textboxe on the SUBFORM to a field named "CostPrice", and that field is not present in the Recordsource of the Subform.
ASKER
Thanks again LSM,
I am approaching the limits of my knowledge here.
Perhaps , if I forget the approach I have explained and merely tell you my objective.
I want to put a (readonly)field on the sub form that is equal to ;
CostPrice on Parent Form * Markup% on Subform.
What is the best way to achieve this?
I am approaching the limits of my knowledge here.
Perhaps , if I forget the approach I have explained and merely tell you my objective.
I want to put a (readonly)field on the sub form that is equal to ;
CostPrice on Parent Form * Markup% on Subform.
What is the best way to achieve this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks LSM,
That was a superb answer.
Your patience and descriptive powers are much appreciated.
That was a superb answer.
Your patience and descriptive powers are much appreciated.
Me.Parent.CostPrice
Except you don't do it from the ControlSource - you do it using the Subform's Current event:
Private Sub Form_Current()
Me.CostPrice = Me.Parent.CostPrice
End Sub