View Single Post
  #7  
Old May 5th, 2010, 08:15 PM posted to microsoft.public.access.forms
neil40[_2_]
external usenet poster
 
Posts: 28
Default Open Continuous form with a few lines showing

On May 5, 1:22*pm, "Linq Adams via AccessMonster.com" u28780@uwe
wrote:
This should do the job

Private Sub Form_Load()
* DoCmd.RunCommand acCmdRecordsGoToNew
*For i = 1 To 5
* *DoCmd.GoToRecord , , acPrevious
*Next i
End Sub

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201005/1


Linq

Thanks for this, the first line returned an error so I took out the
DoCmd and now it works.
Furthermore, I added another loop to take the cursor back down to the
input line

So it now reads:
Private Sub Form_Load()
RunCommand acCmdRecordsGoToNew
For i = 1 To 5
DoCmd.GoToRecord , , acPrevious
Next i
For j = 1 To 5
DoCmd.GoToRecord , , acNext
Next j
End Sub

Perfect!

Neil