Results 1 to 4 of 4
  1. #1
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694

    save last record in table through a form

    all,

    I have a form where I want to run the save record command behind a button. the problem is that the command only works if the button is in the record areas of the form (e.g. - detail section). the table will have 5 records in it when I want to save the last record.

    question - how would I save that particular record (the last one) from the button if it is located in the form's footer?

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    I have figured out a workaround:
    Code:
       DoCmd.GoToRecord acDataForm, Me.Name, acLast
       DoCmd.RunCommand (acCmdSaveRecord)
    if anyone has something better that wouldn't cause flickering, I would like to know. thanks!

  3. #3
    Join Date
    Apr 2010
    Posts
    21
    What happens if you use Docmd.GoNextRecord?

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by dynamictiger View Post
    What happens if you use Docmd.GoNextRecord?
    interesting...but I'm not going to test it becauase using ACLAST does the job for now. nextRec would not improve the situation.

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

Similar Threads

  1. VBA: Find Record from in table from form
    By shimmy84 in forum Programming
    Replies: 6
    Last Post: 03-19-2012, 10:51 PM
  2. Replies: 2
    Last Post: 03-29-2010, 11:52 AM
  3. Replies: 0
    Last Post: 04-13-2009, 04:02 AM
  4. Turn Off Auto Save Record
    By Syntinal in forum Forms
    Replies: 2
    Last Post: 03-01-2009, 11:30 AM
  5. Replies: 0
    Last Post: 06-30-2006, 09:00 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