Save button?

H

Harmannus

Hallo,

Any suggestion on how to implement a save button option?. I have code that i
put in the before update event so leaving the form triggers the code.

But how do i use a save button? Simply using: DoCmd.DoMenuItem acFormBar,
acEditMenu, acUndo, , acMenuVer70?

Would be nice to gray the me.savebutton.visable=false. In the on open form i
use this code but where do i put the code me.savebutton.visable=true when a
record is edited?

Is there a "nice" way to accomplish this?

Regards,

Harmannus
 
R

Rick Brandt

Harmannus said:
Hallo,

Any suggestion on how to implement a save button option?. I have code that i
put in the before update event so leaving the form triggers the code.

But how do i use a save button? Simply using: DoCmd.DoMenuItem acFormBar,
acEditMenu, acUndo, , acMenuVer70?

Would be nice to gray the me.savebutton.visable=false. In the on open form i
use this code but where do i put the code me.savebutton.visable=true when a
record is edited?

Is there a "nice" way to accomplish this?

Me.Dirty = False will save the record.

Access 2002 has an OnDirty event that would indicate when the record had been
modified. In older versions you would need to use the AfterUpdate event of all
of the controls or test the dirty property in a Timer event.
 
Top