Subform Record selector

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to get the record selector to be at the top of my subform so that I dont have to keep scrolling down to make a new entry. Can someone tell me how to do this
Thanks
 
I don't know of a way to do that, but you can put a command button in the
subform's header or footer that will move you to a new record easily. Put a
command button (name it "cmdNewRecord") and use code similar to this on the
OnClick event:

Private Sub cmdNewRecord_Click()
Me.Recordset.AddNew
Me.ControlNameToGetFocus.SetFocus
End Sub


--
Ken Snell
<MS ACCESS MVP>

Angel said:
I'm trying to get the record selector to be at the top of my subform so
that I dont have to keep scrolling down to make a new entry. Can someone
tell me how to do this?
 
Here is something else you can try. If you use this
suggestion, upon entry into your subform, you will
navigate directly to a new, empty record.

In the On Enter event of the control on your main form
that contains the subform (not the subform itself), enter
this code:

Private Sub frmYourSubFormName_Enter()
DoCmd.GoToRecord , , acNewRec
End Sub

Denny G.
-----Original Message-----
I'm trying to get the record selector to be at the top
of my subform so that I dont have to keep scrolling down
to make a new entry. Can someone tell me how to do this?
 
Denny I tried to put the code it but it didnt work. First I could not find the ON Enter on my main forms properity list. Only in my fields did i have that option. I tried putting this in the first field on my main form which is Staff I
Private Sub Form Attendance_and_Date_Subform_Enter(
DoCmd.GoToRecord,,acNewRe
Am I suppose to be in the form properties of my main form? If so there is no "On Enter" What am I missing

----- Denny G. wrote: ----

Here is something else you can try. If you use this
suggestion, upon entry into your subform, you will
navigate directly to a new, empty record.

In the On Enter event of the control on your main form
that contains the subform (not the subform itself), enter
this code

Private Sub frmYourSubFormName_Enter(
DoCmd.GoToRecord , , acNewRe
End Su

Denny G
-----Original Message----
I'm trying to get the record selector to be at the top
of my subform so that I dont have to keep scrolling down
to make a new entry. Can someone tell me how to do this
 
Back
Top