Requery and Navigation

Y

yooper_ssm

Background: I have a Main form frm1 which contains 2 subforms sfm1 and sfm2.
On frm1 I have a command button which opens - another form - frm2 which
allows me to add a record to the date table. The date table's data is
displayed in sfm1 on frm1.

Problem: I can do a Form!frm1.requery from the unload event of frm2 but I
can't do any form of record navigation

Question: is there a way to navigate to the last record of the form sfm1.
Below is the code i have tried.

Forms![frmMainWorshipSchedule].[sfmServiceTimeDateNotes].SetFocus
DoCmd.GoToRecord , , acFirst
DoCmd.GoToRecord , , acLast
DoCmd.GoToRecord , , acPrevious, 5
DoCmd.GoToRecord , , acNext, 5
 
Y

yooper_ssm

Hey I got it to work using this.

Forms![frmMainWorshipSchedule].[sfmServiceTimeDateNotes].Form.Requery
Forms![frmMainWorshipSchedule].[sfmServiceTimeDateNotes].Form.Recordset.MoveLast
Forms![frmMainWorshipSchedule].[sfmServiceTimeDateNotes].Form.Recordset.Move
-5
Forms![frmMainWorshipSchedule].[sfmServiceTimeDateNotes].Form.Recordset.Move 5
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top