Auto Refreshing data? (1 Viewer)

NeoZakz

Registered User.
Local time
Today, 10:08
Joined
Jul 22, 2002
Messages
12
I have a form with 2 sub forms in it. And I just finished the code to update some dates in there. But what Im having trouble with now is that when I change the dates on the form where it pulls the dates from I cant get it to update the other subform that uses them. Anyone got any ideas on how to get the dates to update on a refresh or reload or something? :confused:
 

CCIDBMNG

Registered User.
Local time
Today, 07:08
Joined
Jan 25, 2002
Messages
154
after you change the date maybe in a lost focus event try using YourSubReport.Requery
 

NeoZakz

Registered User.
Local time
Today, 10:08
Joined
Jul 22, 2002
Messages
12
Better explanation maybe.

I tried what you suggested didnt like that. I tried to come up with a better explanation of what Im doing here.

Okay here it is, 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 (thanks to some help from this MB). Anyway 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.
 

jostrep

Registered User.
Local time
Today, 15:08
Joined
May 19, 2002
Messages
30
I got the same kind of forms, what i did was to link all the queries/subforms to the same table wich contains the search parameters ex date. Then include in your main form a refresh button (via a macro).

Hope that's can help you
Jos
 

Users who are viewing this thread

Top Bottom