Results 1 to 5 of 5
  1. #1
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124

    save record

    Hi
    I want to use an "enter " button at the end of my form to feed the data to table, rather that Tab to feed it. I have used save record function but also want to add a msg bob when I press save record button which says record has been saved.


    Also, want to remove that feature of Tab feeeding data when I fill the form.

    thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Is the form in Single or Continuous view?

    After the save code:
    MsgBox "Record saved"

    If you don't want form to cycle to next record, set the Cycle property to CurrentRecord.
    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.

  3. #3
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124
    Quote Originally Posted by June7 View Post
    Is the form in Single or Continuous view?

    After the save code:
    MsgBox "Record saved"

    If you don't want form to cycle to next record, set the Cycle property to CurrentRecord.
    Sorry, I dont know much about the codes, it says this code for enter button

    Private Sub Cmd_enter_Click()
    On Error GoTo Err_Cmd_enter_Click

    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
    Exit_Cmd_enter_Click:
    Exit Sub
    Err_Cmd_enter_Click:
    MsgBox Err.Description
    Resume Exit_Cmd_enter_Click

    End Sub

    can you tell me where should i put the message box code ?

  4. #4
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124
    Can you actually give me full code which save data and show msgbox?

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    I would use:

    DoCmd.RunCommand acCmdSaveRecord
    MsgBox "Record Saved"

    The error handling stuff is your option.
    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: 4
    Last Post: 05-08-2012, 08:07 AM
  2. Performing record changes upon save
    By jlreis28 in forum Access
    Replies: 5
    Last Post: 04-25-2012, 08:18 AM
  3. save record in 2 table
    By smahdih in forum Forms
    Replies: 2
    Last Post: 11-13-2011, 12:51 AM
  4. On Add record, how do I force a Save first?
    By KathyL in forum Programming
    Replies: 11
    Last Post: 07-18-2011, 12:37 PM
  5. Duplicate Record Cannot Save
    By magicscreen in forum Programming
    Replies: 2
    Last Post: 09-15-2010, 08:15 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