Results 1 to 6 of 6
  1. #1
    smc678 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    65

    How do I add to my code goto new form

    How do I add to the end of my code to goto a new form? The form name is Attendance


    Private Sub Command36_Click()
    If IsNull(Me.Combo63.Value) Then
    MsgBox "Input By?", vbCritical, "Input Error"
    Me.Combo61.SetFocus
    Me.Combo63.SetFocus

    End If
    End Sub

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Look at

    DoCmd.OpenForm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    smc678 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    65
    dosent work Compile Error

  4. #4
    smc678 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    65
    I also tried this and no go!


    Private Sub Command36_Click()
    If IsNull(Me.Combo63.Value) Then
    MsgBox "Input By?", vbCritical, "Input Error"
    Me.Combo61.SetFocus
    Me.Combo63.SetFocus

    DoCmd.GoToRecord , , acNewRec.

    End If
    End Sub

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Did you add the required arguments to the OpenForm? Is that period actually in the code?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    First you talk about going to a a 'new Form,' then you use code to go to a New Record, and you also set Focus on two different Controls consecutively, which makes no sense at all!

    I think, perhaps, you need to simply explain, in plain language, what your scenario is and what you're trying to accomplish, if we're to help you.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 1
    Last Post: 06-09-2012, 05:44 PM
  2. Replies: 13
    Last Post: 01-29-2012, 01:45 PM
  3. Goto Record
    By jgalloway in forum Forms
    Replies: 8
    Last Post: 09-25-2011, 08:03 AM
  4. Replies: 1
    Last Post: 06-01-2011, 06:44 PM
  5. Replies: 1
    Last Post: 12-22-2010, 01:28 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