Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2004
    Posts
    277

    Unanswered: best way to make sure a record is saved

    this might be a really stupid question, but I've been noticing that my SalesID field has not been saving correctly. The SalesID is the last field on the form.

    DoCmd.Save?

    Me.Refresh?

    Something Else?

  2. #2
    Join Date
    Jan 2005
    Location
    United Arab Emirates
    Posts
    23
    A different approach

    Code:
     If Me.Dirty = True Then
    Me.Dirty = False
    End If

  3. #3
    Join Date
    Dec 2004
    Posts
    277
    where would I put that .. and what does that do?

  4. #4
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    Quote Originally Posted by DackJaniels
    this might be a really stupid question, but I've been noticing that my SalesID field has not been saving correctly. The SalesID is the last field on the form.

    DoCmd.Save?

    Me.Refresh?

    Something Else?
    The best way to assure the record saving is to click on the left side panel of the screen. You'll notice that before you make a change in a given record, the record indicator on the left-top of the screen is a blackened triangle. When you make any change at all, that icon turns to a pencil (the "dirty" icon). If you hit Escape, the icon changes back to a triangle, and all changes are undone. If you click on the left panel instead, the record is saved and the icon returns to the triangle. I have found that this is the most reliable way to save the record, and in fact, I have instructed my users to do exactly that when they are saving the last item in a list.

    Sam

  5. #5
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    To save a record in code you can use the following command:

    DoCmd.RunCommand acCmdSaveRecord

    I use it frequently to make sure any changes are written to the table. Especially if the user made a change and presses a button to print a report.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •