G
Guest
Hello all,
I have a continuous form called FORM1 with
in the On Click event of the detail section
DoCmd.OpenForm "FORM2", acNormal, , "([fieldid] =" & [fieldid] & ")",
acFormEdit, acWindowNormal, Me.Name
The table behind FORM1 has hundreds of records. So, I scroll down to one of
the last records and click on the record.
It opens a form FORM2 with more details (based upon the same table) with
"([fieldid]=& [fieldid] & ")" as the where condition.
FORM2 is in normal Single Form mode.
On FORM2 i do some changes and
on FORM2 i have a close-button with this code:
Dim strDoc As String
If Not IsNull(Me.OpenArgs) Then
strDoc = Nz(Me.OpenArgs, vbNullString)
End If
DoCmd.Close acForm, Me.Name, acSaveNo
If strDoc <> vbNullString Then
If CurrentProject.AllForms(strDoc).IsLoaded Then
Forms(strDoc).Requery
End If
End If
I closes the FORM2 and requeries the calling FORM1 to update changes made in
FORM2. OK this works.
The trouble is that requerying the calling form makes the first record on
that form current. So to see the changes a made in FORM2 i have to scroll
down in the list of FORM1 to see the effect of changes.
Is there a way to go right back to the record on which i clicked the On
Click event..?
Any help would be welcom.
I have a continuous form called FORM1 with
in the On Click event of the detail section
DoCmd.OpenForm "FORM2", acNormal, , "([fieldid] =" & [fieldid] & ")",
acFormEdit, acWindowNormal, Me.Name
The table behind FORM1 has hundreds of records. So, I scroll down to one of
the last records and click on the record.
It opens a form FORM2 with more details (based upon the same table) with
"([fieldid]=& [fieldid] & ")" as the where condition.
FORM2 is in normal Single Form mode.
On FORM2 i do some changes and
on FORM2 i have a close-button with this code:
Dim strDoc As String
If Not IsNull(Me.OpenArgs) Then
strDoc = Nz(Me.OpenArgs, vbNullString)
End If
DoCmd.Close acForm, Me.Name, acSaveNo
If strDoc <> vbNullString Then
If CurrentProject.AllForms(strDoc).IsLoaded Then
Forms(strDoc).Requery
End If
End If
I closes the FORM2 and requeries the calling FORM1 to update changes made in
FORM2. OK this works.
The trouble is that requerying the calling form makes the first record on
that form current. So to see the changes a made in FORM2 i have to scroll
down in the list of FORM1 to see the effect of changes.
Is there a way to go right back to the record on which i clicked the On
Click event..?
Any help would be welcom.