if i can 'jump in' here....
in my form, i want to let the user make changes in one control (On-Study
Date) which are translated into changes in another control (Future Visit). so
in my after update event property i wrote the following code:
Private Sub On_Study_Date_AfterUpdate()
Dim Future_Visit As Date
Dim On_Study_Date As Date
If Me.Dirty Then
If Not IsNull(Me.IRB_) Then
Me.Future_Visit = DLookup("FollowUp", "Query5 B", "[Forms]![Screening
Log]![F/U Status] = 'Alive'")
Me.Months = DLookup("Months", "Query5 B", "[Forms]![Screening Log]![F/U
Status] = 'Alive'")
Me.Requery
End If
End If
End Sub
the 'problem' as they say is that the requery command takes the user to the
first record in the underlying table. what i want is for this to occur as
'seamlessly' as possible and leave the user viewing the same record (s)he
just modified.
i am using a contrived a2k mdb file i threw together to test out my SQL
queries and so forth and the underlying table ("Patients on F/U") has a PK
which is text called "IRB" (in the full blown one, i doubt i can get by with
just one and will use a composite PK consisting of some text and number
fields, but anyway...), when i tried working your code into my own, the l/u
table did not resolve to the "PKfield"...so, can you please tell me what i am
doing wrong?
thanks for any help in advance,
-ted