M
Mark A. Sam
Hello,
The following procedure works off a button on a popup form and updates a
subform recordset that the popup is opened from. The popup is in Data
Entry.
Private Sub New_Click()
On Error GoTo error_Section
DoCmd.GoToRecord , , acNewRec
[SentTo].SetFocus
Dim frm As Form
Set frm = Forms![Letter Composition Pad]![Letter Truckers Log].Form
frm.Requery 'Requery Subform to display new record.
Dim rst As Recordset
Set rst = frm.RecordsetClone
rst.MoveLast
frm.Bookmark = rst.Bookmark 'Move to last record on subform
Set frm = Nothing
Set rst = Nothing
exit_Section:
Exit Sub
error_Section:
MsgBox Err.Description
Resume Next
End Sub
The procedure displays the new record on the subform, however the records
all scroll up, so I need to move to several previous records in the subform
to display them.
So in other words, the popup form is for entering new records. As each new
record is added, the subform is updated to display the new entries, but they
are scrolled off the screen. I need a method to scroll back a few records
to see the previous entries.
Thanks for any help. God Bless,
Mark A. Sam
The following procedure works off a button on a popup form and updates a
subform recordset that the popup is opened from. The popup is in Data
Entry.
Private Sub New_Click()
On Error GoTo error_Section
DoCmd.GoToRecord , , acNewRec
[SentTo].SetFocus
Dim frm As Form
Set frm = Forms![Letter Composition Pad]![Letter Truckers Log].Form
frm.Requery 'Requery Subform to display new record.
Dim rst As Recordset
Set rst = frm.RecordsetClone
rst.MoveLast
frm.Bookmark = rst.Bookmark 'Move to last record on subform
Set frm = Nothing
Set rst = Nothing
exit_Section:
Exit Sub
error_Section:
MsgBox Err.Description
Resume Next
End Sub
The procedure displays the new record on the subform, however the records
all scroll up, so I need to move to several previous records in the subform
to display them.
So in other words, the popup form is for entering new records. As each new
record is added, the subform is updated to display the new entries, but they
are scrolled off the screen. I need a method to scroll back a few records
to see the previous entries.
Thanks for any help. God Bless,
Mark A. Sam