From: NEWER USER on 3 Dec 2009 11:52 I have a Subform that resides on numerous Forms. I have a calculated field on the Subform that references a field on the Form. [Cost] - Forms.FormName.[Cost] As I place the same Subform on other Forms, the reference is now incorrect because the Form Name has changed. What coding would I use to replace Forms.FormName so the subform will reference the Current Form and display values correctly? Any help appreciated!
From: Al Campagna on 3 Dec 2009 12:20 Newer, Try... =[parent].[Form]![Cost] Tested OK for me, with a subform field that got it's vale from City on my main form. -- hth Al Campagna Microsoft Access MVP http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll never work a day in your life." "NEWER USER" <NEWERUSER(a)discussions.microsoft.com> wrote in message news:6842A325-7A3A-4399-92CE-0F119BF03F74(a)microsoft.com... >I have a Subform that resides on numerous Forms. I have a calculated field > on the Subform that references a field on the Form. > > [Cost] - Forms.FormName.[Cost] > > As I place the same Subform on other Forms, the reference is now incorrect > because the Form Name has changed. What coding would I use to replace > Forms.FormName so the subform will reference the Current Form and display > values correctly? Any help appreciated!
From: Stuart McCall on 3 Dec 2009 12:26 "NEWER USER" <NEWERUSER(a)discussions.microsoft.com> wrote in message news:6842A325-7A3A-4399-92CE-0F119BF03F74(a)microsoft.com... >I have a Subform that resides on numerous Forms. I have a calculated field > on the Subform that references a field on the Form. > > [Cost] - Forms.FormName.[Cost] > > As I place the same Subform on other Forms, the reference is now incorrect > because the Form Name has changed. What coding would I use to replace > Forms.FormName so the subform will reference the Current Form and display > values correctly? Any help appreciated! Me.Parent.Form.ControlName is what you need.
From: KARL DEWEY on 3 Dec 2009 12:40 Open in design view and edit. -- Build a little, test a little. "NEWER USER" wrote: > I have a Subform that resides on numerous Forms. I have a calculated field > on the Subform that references a field on the Form. > > [Cost] - Forms.FormName.[Cost] > > As I place the same Subform on other Forms, the reference is now incorrect > because the Form Name has changed. What coding would I use to replace > Forms.FormName so the subform will reference the Current Form and display > values correctly? Any help appreciated!
From: NEWER USER on 3 Dec 2009 13:37
Thank you so much. Worked perfectly. Happy Holidays. "Al Campagna" wrote: > Newer, > Try... > =[parent].[Form]![Cost] > > Tested OK for me, with a subform field that got it's vale from City > on my main form. > -- > hth > Al Campagna > Microsoft Access MVP > http://home.comcast.net/~cccsolutions/index.html > > "Find a job that you love... and you'll never work a day in your life." > > "NEWER USER" <NEWERUSER(a)discussions.microsoft.com> wrote in message > news:6842A325-7A3A-4399-92CE-0F119BF03F74(a)microsoft.com... > >I have a Subform that resides on numerous Forms. I have a calculated field > > on the Subform that references a field on the Form. > > > > [Cost] - Forms.FormName.[Cost] > > > > As I place the same Subform on other Forms, the reference is now incorrect > > because the Form Name has changed. What coding would I use to replace > > Forms.FormName so the subform will reference the Current Form and display > > values correctly? Any help appreciated! > > > . > |