Pytanie : Dlookup #name Błąd z subform

I mieć główny forma z the następujący pole:
[urodziny] - (wchodzić do informacja),
[prąd wiek] - DateDiff ("yyyy", [DOB], Teraz ())+Int (Format (Teraz (), " mmdd") rmat ([DOB] , "mmdd"))
[Miesiąc] - DatePart ("m", [DOB])
[Rok] - DatePart ("yyyy", [DOB])

I mieć tLifeRate stół z the następujący:
Current_Age Tempo Amount
<70 $1.45 10,000.00
70 - 74 $0.90 $6,500.00
75-79 $0.65 $4,500.00
80 $0.44 $3,000.00

I mieć życie subform z pole [Tempo] na ono. Gdy the Życie subform być aktywny I próbować the [tempo] robić dlookup opierać się na the [current_age] i wracać the tempo kwota need.

This być mój funkcja I mieć problem with.
=IIf (Forma! fInputRetiree! Current_Age<70, DLookUp (" [Tempo] ", "tLifeRate"," [Current_Age] = [Forms]! [fInputLife]! [ Current_Age] "),
IIf (Forma! fInputRetiree! Current_Age>=70 I fInputRetiree! Current_Age<=74, DLookUp (" [Tempo] ", "tLifeRate"," [Current_Age] = [Forms]! [fInputLife]! [Current_Age] "),
IIf (Forma! fInputRetiree! Current_Age>75 I fInputRetiree! Current_Age<=79, DLookUp (" [Tempo] "," tLifeRate "," [Current_Age] = [Forma]! [ fInputLife]! [Current_Age] "),
IIf (Forma! fInputRetiree! Current_Age>80, DLookUp(" [Tempo] ", " tLifeRate", "[Current_Age] = [Forma]! [ fInputLife]! [Current_Age] ")))))

Odpowiedź : Dlookup #name Błąd z subform

Próbować To


=IIf (Forma! fInputRetiree_Information! Current_AgeUp<70> ("[Tempo]", "tLifeRate"," [Current_Age] = ""& "<70>ee_Information! Current_Age>69 I Forma! fInputRetiree_Information! Current_AgeDLookUp<75> (" [Tempo] ", "tLifeRate"," [Current_Age] =" "& "70-74" &" ""), IIf (Forma! fInputRetiree_Information! Current_Age>74 I Forma! fInputRetiree_Information! Current_AgeDLookUp<80> (" [Tempo] ", "tLifeRate"," [Current_Age] =" "& "75-79" &" ""), IIf (Forma! fInputRetiree_Information! Current_Age>79, DLookUp (" [Tempo] ", "tLifeRate"," [Current_Age] =" "& "80" &" '"), (0)))))

Ty także potrzebować

Me.fInputLife.Requery

w the AfterUpdate wydarzenie the Birthdate pole na twój główny forma the zmiana w twój życie subform.

The sposób….  Ono być.
Ty miewać forgotton the "_Information" gdy odnosić się twój forma ie
Forma! fInputRetiree potrzebować Forma! fInputRetiree_Information

Leigh



Inne rozwiązania  
 
programming4us programming4us