Subform Record selector

A

Angel

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
 
K

Ken Snell

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?
 
D

Denny G.

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?
 
A

Angel

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
 

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