dont update record untill a save button is pressed on form (1 Viewer)

Ramnik

Registered User.
Local time
Today, 08:06
Joined
Jul 12, 2012
Messages
145
hello everyone ,
how to restrict the updation of a record while entering untill a save button is pressed on the form ???????? is it possible without the vba ?
thanks...
 

Ramnik

Registered User.
Local time
Today, 08:06
Joined
Jul 12, 2012
Messages
145
So what should be done ???????? what kind of level is needed to implement this in vba ????????? can u explain ? thanksss
 

MStef

Registered User.
Local time
Today, 03:36
Joined
Oct 28, 2004
Messages
2,251
You don't need a button for this.
Look at "DemoSaveA2000.mdb" (attachment, zip).
Try to enter a new record.
Look at VBA (Form_BeforeUpdate).
Adapt it in your MDB.
 

Attachments

  • DemoSaveA2000.zip
    15.3 KB · Views: 2,455

Ramnik

Registered User.
Local time
Today, 08:06
Joined
Jul 12, 2012
Messages
145
Thanks but i do need a save button on my forms to let the users know that they have saved the entry ... for me it is necessary to implement error free entry .... so i need to know how it is to be done with save button only
 

Ramnik

Registered User.
Local time
Today, 08:06
Joined
Jul 12, 2012
Messages
145
well bob are u sure it really save and update the table when clicking on save or the actually updation is made when we leave the form
???? nd moreover when i click save my existing entries should go away on to the table .... actually i have followed wht u said but it doesnt check the validation of my table when clicking on save . it checks it when i want to close the form ?
thanks
 

Ramnik

Registered User.
Local time
Today, 08:06
Joined
Jul 12, 2012
Messages
145
yes i have checked that it wont save the record untill a save button is pressed ..
but when i enter invalid data then after pressing save button it doesnt show me the validation error .. it shows the error when i close the form . why is that ? and what if i want to clear the form when record is updated afer clicking the save button ? thankssss
 

Ramnik

Registered User.
Local time
Today, 08:06
Joined
Jul 12, 2012
Messages
145
I need step by step process for creating a save button so that only that will update the record and clear the saved data from the form . thanksssss
 

barathi23

New member
Local time
Today, 08:06
Joined
May 7, 2016
Messages
4
This code has been of great help. I want to also add a code to go to new record for click() event in the save button. Please post that.
 

nj_best

Registered User.
Local time
Yesterday, 19:36
Joined
Jul 11, 2015
Messages
12
blnSave = MsgBox("Are you sure you want to save this record?", vbQuestion + vbYesNo, "Save Confirmation)

this line is giving error and being turn into red color.
plz check this line and tell me the correct line.
error is compile error and syntax error
 

mgui

Registered User.
Local time
Yesterday, 19:36
Joined
Nov 18, 2017
Messages
10
I have add the codes below to my form. When I click the save button the pop to confirm saving comes up, but when I click yes it does not save the data on the form to my table. What am I doing wrong?

Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not blnSave Then
Cancel = True
Me.Undo
blnSave = False
End If


End Sub

Private Sub save_Click()
blnSave = MsgBox("Are you sure you want to save this record?", vbQuestion + vbYesNo, "Save Confirmation")


I would really appreciate any help you can give me
 

mgui

Registered User.
Local time
Yesterday, 19:36
Joined
Nov 18, 2017
Messages
10
Also, is it possible to add an update button to my form? I want to be able to update an existing record in my database. I already have a record search combo box on my form, that auto-fills the form with the info from my table.
 

Users who are viewing this thread

Top Bottom