pop control in subform from main form

TLJ

Registered User.
Local time
Today, 19:28
Joined
Aug 17, 2003
Messages
31
I have a financial subform inside a main form. My main form has a payment begin date. I have a datediff statement to count months between current date and payment begin date. I have these in the footer of the financial subform

My date diff looks like: =DateDiff("m",[PFs BEGIN],[TEXT28])
Text 28 is a DAte() field

My problem is that my form only updates my amounts paid when i switch to form view on my subform and put the cursor in [PFs Begin]

I was really hoping that I could gather my beginning date from a control existing on my main form. My main form is called OFFENDER CARD, its table is Clients, and the control is called MO Begins. My subform is Financial Subform3, and its table is FINANCIAL

Could someone please help me with this expression or tell me what I am doing wrong. Thank you
 
This article will show you how to refer to controls on a subform from a main form and vice versa....

hth,
Jack
 
I have saved the article in my favorites for future reference. I admit that I am rather dense and new to this. No matter what syntax I have tried, I get a #NAME? in my subform field when trying to give it the value assigned to the parent form. Do I want to assign it to the form control or to the table field.?

Please write an example. I am afraid that I don't know what the Me. is in some of the Me. examples in the article.

Thank you for your patience.
 
This syntax will refer to a control on your main form from a subform:

[Forms]![MainFormName]![ControlName]

This will work too:

[Parent].[ControlName]

To add together a value in a control on the main form and a value in a control on a subform use code like this as the Control Source for an unbound control on the subform:

=[Forms]![MyMainForm]![MySubForm].[Form].[MySubformControlName] + [Forms]![MyMainForm]![MyControl]

Me is shorthand for a forms name. You can replace [Forms]![MyForm]![MyControl] with Me.[MyControl] as Me represents [Forms]![MyForm].

hth,
Jack
 
Thanks,

I wasn't putting an (=) in my contol box.

Also I changed my tab order on my subform footer as it wasn't doing my math. I thought tab order was just the way I manually tabbed thru the form. Seemed to make a difference.

I now have a financial tracking table that works:) :) :) :)


I am sure I will be posting another problem. Probably tonight as I am working on another project handed down on Friday.

I have to do a percentage compliance table and form. 4 criteria per client record and then totaled / 4 for a percentage of compliance. i have created a table to hold my info and a form with combo boxes for alpha values yes, no, not required. (perhaps some kind of conditional expression with no =0 and else =1 as either yes or not required are positive or would not required be null. Depends on how one would want to manipulate the answer as not having null values would increase the overall percentages. Not sure how to convert these answers to numerical values and then calculate each percentage, add percentages together, and then find a total percentage.
Kinda looks like I have already asked doesn't it? tlj
 
Last edited:
I don't quite understand your question about percentages and how the Yes/No/Null figures in, but take a look at a Totals query as Avg is one of the answers that are possible...

Good luck with your project...

Jack
 

Users who are viewing this thread

Back
Top Bottom