T
Ted
i've done a bit of reading in this forum and concluded that using an
'OnChange' event to handle this is not advisable. what i read led me to
believe that the 'BeforeUpdate' update was the way. what i want to happen is
allow for any modifications to an 'On Study Date' field to affect the value
computed in another control which displays the date of a follow-up visit.
more to the point, the code i put into the 'On-Study Date' control was
Private Sub On_Study_Date_BeforeUpdate(Cancel As Integer)
Dim Future_Visit As Date
If Not IsNull(Me.IRB_) Then Me.Future_Visit.Value = DLookup("FollowUp",
"Query4")
End Sub
i don't know how much in the way of gory details are needed to puzzle out
why (when i make a change to the date in 'On-Study Date') it doesn't work (as
in cause the computed value of Future_Visit to occur but i wll fill in any
relevant blanks. oh, yes, i found that going to another record and then
returning to the one bearing the changed 'On-Study Date' DID result in an
updated value of the 'Future_Visit' but i'll be darned if i understood all
that.
any thoughts (bear in mind i consider myselfl to be a relative newbie to all
this).
tia,
-ted
'OnChange' event to handle this is not advisable. what i read led me to
believe that the 'BeforeUpdate' update was the way. what i want to happen is
allow for any modifications to an 'On Study Date' field to affect the value
computed in another control which displays the date of a follow-up visit.
more to the point, the code i put into the 'On-Study Date' control was
Private Sub On_Study_Date_BeforeUpdate(Cancel As Integer)
Dim Future_Visit As Date
If Not IsNull(Me.IRB_) Then Me.Future_Visit.Value = DLookup("FollowUp",
"Query4")
End Sub
i don't know how much in the way of gory details are needed to puzzle out
why (when i make a change to the date in 'On-Study Date') it doesn't work (as
in cause the computed value of Future_Visit to occur but i wll fill in any
relevant blanks. oh, yes, i found that going to another record and then
returning to the one bearing the changed 'On-Study Date' DID result in an
updated value of the 'Future_Visit' but i'll be darned if i understood all
that.
any thoughts (bear in mind i consider myselfl to be a relative newbie to all
this).
tia,
-ted