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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stop from saving unless saved is pressed 2

Status
Not open for further replies.

ralphus

Technical User
Dec 30, 2004
28
0
0
GB
I don't want any changes to a record to be made unless the user presses the save button what can i do to stop this i am using forms
cheers
 
use a unbound form for starters
on the btnsave_click event
run either a insert if it is a new record
or a update if it is a edited record
 
How are ya ralphus . . . . .

In the [blue]BeforeUpdate event[/blue] of the form, try:
Code:
[blue]   cancel = True[/blue]

Calvin.gif
See Ya! . . . . . .
 
to TheAceMan1
just gave you a Star beacuse i admier the simplicity of your post
may i add on the btnsave_click event all you need is
DoCmd.RunCommand acCmdSaveRecord
and in the BeforeUpdate event of the form
cancel= not me.activecontrol.name="btnsave
 
How are ya pwise . . . . .

[purple]Thank God with Access there's always more than one way to skin a cat![/PURPLE] ;-)

Calvin.gif
See Ya! . . . . . .
 
I'm glad I ran across this thread, because i'm running into a similar problem. Please excuse if I come across a bit dense, since I'm relativley new at creating access forms.

I too don't want MS-access to auto save a new or edit record ...I want the users to force the save (primarily so that they don't screw an edit up and know what they are saving)

In my sitution, I have a primary form with subforms

I tried to use the BeforeUpdate event cancel = true statement. But my form hangs I can't even save even at a form level.

Also, I'm a bit confused as to what btnsave is suppose to be ...is this an alternate save button other than the one provided on the tool bar?
 
Ok another question, what do you mean by "unbound form"?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top