Order of records in a Form

User avatar
silverback
5StarLounger
Posts: 774
Joined: 29 Jan 2010, 13:30

Order of records in a Form

Post by silverback »

I last used Access in 2013, so I'm very rusty on its use; I apologise for having to ask rudimentary questions.
I've created a form which is displaying the records OK and I have managed to sort them in the order I want. Two immediate problems.
1. In the records displayed, the New Record (the one with the asterisk at the left hand end) is at the bottom of the records displayed. Is there a way to get this displayed always as the 'first record'.
2. If not, how can the focus be set to the field 'Cost' in the 'new record', so data entry can start immediately without having to click in this Cost field?
Can it be done without recourse to VBA? If not, what is the VBA, please?
Thanks
Silverback

User avatar
burrina
4StarLounger
Posts: 550
Joined: 30 Jul 2014, 23:58

Re: Order of records in a Form

Post by burrina »

Me.Cost.SetFocus
DoCmd.GoToRecord , , acNewRec

Maybe this is what you want, unsure about your question.
HTH

User avatar
HansV
Administrator
Posts: 78463
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Order of records in a Form

Post by HansV »

As Burrina implies, the answer to 1. is No: in a continuous form, the new record is always at the bottom.
His code example shows how to move to a new record and set focus to the Cost control.
Best wishes,
Hans