Results 1 to 3 of 3
  1. #1
    mchadwick is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Posts
    71

    subform, click a button and goto control of last record


    I have a subform in a form linked together by a LANID, on averge there are 5 records in the subform that are connected to the Form. So, I want to add a new record in the subform for this LANID (we'll say it is "domain\bjones"). I want to put a button on the form footer and when clicked go to the last record of "domain\bjones" (the record currently open) records or information and modify the record (which is a new record). WHat I have tried to do so far is to put a macro on the button and do a goto record and it says the form is closed. I do have it (subform) open in the form.

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Try this:
    DoCmd.GoToRecord , , acLast
    HTH

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    Which form footer?

    If the button is on the main form, then must first set focus to the subform container control. I always name container different from the object it holds, like ctrDetail.

    Me.ctrDetail.SetFocus
    DoCmd.GoToRecord , , acNewRec
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 7
    Last Post: 06-24-2013, 05:43 PM
  2. Replies: 3
    Last Post: 03-29-2012, 12:40 PM
  3. Replies: 13
    Last Post: 01-29-2012, 01:45 PM
  4. Goto record in subform - sometimes
    By RasterImage in forum Forms
    Replies: 6
    Last Post: 09-13-2011, 04:36 PM
  5. Goto a new record in tabbed subform
    By snoopy2003 in forum Programming
    Replies: 3
    Last Post: 03-05-2011, 04:24 PM

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