Subform to Subform reference

G

Guest

Not sure if I can do this, and tried suggestions from other posts, no luck.

I have a main form "Issues". Two subforms, sub1 "frmdates", sub2 "frmckts".
sub 2 frmckts has a calculated field "DD". sub1 frmdates has a "duedate"
field.

Here's my goal which is basically an IIF statement, but I couldn't get the
references right, or maybe it's not possible.

If sub2 DD = 0 AND sub1 duedate is Null, display "TBD", if not, sub1 duedate.

Thanks!
Mar
 
M

Marshall Barton

Mary said:
Not sure if I can do this, and tried suggestions from other posts, no luck.

I have a main form "Issues". Two subforms, sub1 "frmdates", sub2 "frmckts".
sub 2 frmckts has a calculated field "DD". sub1 frmdates has a "duedate"
field.

Here's my goal which is basically an IIF statement, but I couldn't get the
references right, or maybe it's not possible.

If sub2 DD = 0 AND sub1 duedate is Null, display "TBD", if not, sub1 duedate.


Assuming the text box with the expression is on the main
form:
=IIf(sub2.FORM.DD = 0 AND sub1.FORM.duedate Is Null, "TBD",
sub1.FORM.duedate)
 
G

Guest

Thank you, that works great on the main form, but I'm trying to get it to
display on sub1. I'm sorry, forgot that part!
 
G

Guest

I used your code and added to it with a nested IIF statement on the main form
which will suit my needs.

=IIf([frmckts].[Form].[DD]>0 And [frmdates].[Form].[duedate] Is Null,"See
Circuits Affected for Due Dates",IIf([frmckts].[Form].[DD]=0 And
[frmdates].[Form].[duedate] Is Null,"Due Date: TBD"," "))

Thanks for your help!
Mary
 
M

Marshall Barton

To do the same thing with a text box on subform1:

=IIf(Parent.sub2.FORM.DD = 0 AND duedate Is Null, "TBD",
duedate)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top