×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How can I have my own custom save button in my form

How can I have my own custom save button in my form

How can I have my own custom save button in my form

(OP)
Hi

I'm wondering if there is anyway to have my own custom save button on my forms instead of using Access's record selectors to save a newly added record, or edits to a record. The same goes for having an Add, Cancel and Delete button.

I have tried to do this using DoCmd MenuItem actions, but have found, when I capture "Write Conflicts" and set the response to acDataErrContinue, that I get a Runtime Error 2051, saying that, the DoCmdMeniItem was cancelled. I think this is because, the write conflict exception was thrown by the DoCmd.DoMenuItem SaveRecord action, and after I've caught the write conflict in the Forms OnError, displayed my own message box, and set the OnError Response to acDataErrContinue, that Access knows that the DoCmd was stopped abnormally.

N.B

I am using Access 97 presently.

RE: How can I have my own custom save button in my form

I normally use:

docmd.close acform,"formname",acsaveyes

and

docmd.close acform,"formname",acsaveno

respectively for saving/close and cancel/close..

Hope this helps..


Phooey
Andrew.j.harrison@capgemini.co.uk
Otherwise known as Windy Bottom.

RE: How can I have my own custom save button in my form

try using:

DoCmd.RunCommand acCmdSaveRecord

Mike Rohde
rohdem@marshallengines.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close