Results 1 to 3 of 3
  1. #1
    djclinton15 is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Nov 2015
    Posts
    123

    How to open a Form to a Spific vField?

    Hi, I have a few fields in a Form & when I open the Form I want the cursor to start in a specific field. i.e. [ArtistsId] on this Form. I used it in another dbs & I thought the code wold be:





    Private Sub ArtistID_Click()
    On Error GoTo Err_Command55_Click




    DoCmd.GoToRecord , , acNewRec
    Forms![2015_Music_Entries_frm].ID.SetFocus


    Exit_ArtistID_Click:
    Exit Sub


    Err_ArtistID_Click:
    MsgBox Err.Number & ": " & Err.Description




    End Sub


    Any advise/suggestions will be greatly appreciated! Thanks in advanced.

  2. #2
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    Is this any better?
    Code:
    Private Sub ArtistID_Click()
    On Error GoTo Err_Command55_Click
    DoCmd.GoToRecord , , acNewRec
    Forms![2015_Music_Entries_frm].Form.ID.SetFocus
    Exit_ArtistID_Click:
    Exit Sub
    Err_ArtistID_Click:
    MsgBox Err.Number & ": " & Err.Description
    End Sub
    

  3. #3
    djclinton15 is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Nov 2015
    Posts
    123
    Thanks for responding to my thread.Unfortunately, your suggestion didn't work. My Form's Default View is in Datasheet if that makes any difference?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 03-02-2014, 01:31 PM
  2. Replies: 2
    Last Post: 08-07-2013, 07:44 AM
  3. Help on report to open form to open query...
    By saseymour in forum Programming
    Replies: 13
    Last Post: 07-16-2013, 08:11 AM
  4. Replies: 1
    Last Post: 05-03-2012, 02:25 PM
  5. Replies: 2
    Last Post: 02-26-2010, 08:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums