Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / November 2007

Tip: Looking for answers? Try searching our database.

How do I set the focus for a field after new (blank) record ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mthornblad@gmail.com - 16 Nov 2007 04:24 GMT
Hi

When I click the "new (blank) record" icon at the bottom of a form,
the cursor disappears.  How can I make the cursor go to the first
field on the form like it does when I first go to the form.

Thanks in advance
Mark Thornblad
Ken Snell (MVP) - 16 Nov 2007 05:00 GMT
Use the form's Current event to run a macro that contains the GoToControl
action, and use that to set the focus to the desired field.

Signature

       Ken Snell
<MS ACCESS MVP>

> Hi
>
[quoted text clipped - 4 lines]
> Thanks in advance
> Mark Thornblad
mthornblad@gmail.com - 16 Nov 2007 05:19 GMT
On Nov 15, 11:00 pm, "Ken Snell \(MVP\)"
<kthsneisll...@ncoomcastt.renaetl> wrote:
> Use the form's Current event to run a macro that contains the GoToControl
> action, and use that to set the focus to the desired field.
[quoted text clipped - 16 lines]
> > Thanks in advance
> > Mark Thornblad

Thanks so much Ken
I really appreciate your help.  Just what I needed.
I have another question about a form/subform which I will make a new
post.

Thank again
Mark
Allen Browne - 16 Nov 2007 05:00 GMT
Use the Current event procedure of the form to SetFocus to the field you
want, if it is at a new record.

Example:

Private Sub Form_Current()
   If Me.NewRecord Then
       Me.[SomeControlNameHere].SetFocus
   End If
End Sub

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Hi
>
[quoted text clipped - 4 lines]
> Thanks in advance
> Mark Thornblad
mthornblad@gmail.com - 16 Nov 2007 05:21 GMT
On Nov 15, 11:00 pm, "Allen Browne" <AllenBro...@SeeSig.Invalid>
wrote:
> Use the Current event procedure of the form to SetFocus to the field you
> want, if it is at a new record.
[quoted text clipped - 24 lines]
> > Thanks in advance
> > Mark Thornblad

Thank you also Allen.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.