Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling the adding ability of close form Buttom

Status
Not open for further replies.

sanan

Technical User
Apr 15, 2004
139
IR
Hi Experts
Is there any way to disable adding new Record when the form is being closed, as you know upon closing a form what ever data is on the form will be added to the it’s Record Source, Can I disable it? Also the same when the Next Record Button is pressed, As you might of have guessed it, I want to be able to Add a New Record into my Record Set only by Pressing a Single Dedicated Button.

Best regards,
Sanan
 
You cannot disable the record save.

You can intercept the save in the form_beforeupdate event procedure and cancel the save and undo the record.
You would need to have a flag variable which you set in your save record button procedure and unset in the beforeupdate procedure after it has been tested.
 
Hi Lupins46
I am a little new in VB, Could you please write the codes for me?

best regards
Sanan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top