Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do subforms auto update?

Status
Not open for further replies.

NeoZakz

Technical User
Jul 22, 2002
25
0
0
US
Im using a Form with 2 other subforms inside of it. Im working with the 2 subforms inside and recently I got the code to make them update dates when I changed the number and dates in the milestones. But the problem is it only changes when I click on the field that I have the code in. Ive tried putting it in different places but no matter where it goes it still needs to be clicked to change dates. Its supposed to work by changing one date on the thrid subform but it only does like I said when you click in one of the fields associated with the 2nd form where the code is.

This is the code Im using to do the dates:

If IsNull(Me![Combo119]) Then
'if null then get value using another indicator
Me![Date Due] = DateAdd("d", Me![Seq], Me![Date Due])
Else
'if not null
Me![Date Due] = DateAdd("d", Me![Seq], DLookup("[MILEDATE]", "MILE", "[combolookup] = [MILESTONE]"))
End If

If anyone has any ideas where to put it or what to add to make it recheck the code whenever its loaded that would be appreciated.

Thanks~
 
Look at the Refresh method on an appropriate event (in your case perhaps the subform's on current event).

Cheers, Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top