First of all, thanks to everyone for their previous support :>) I have more
advice to ask.
In order to prevent accidental loss of data (from inadvertent keystrokes)
I've locked the Main Form from editing using the form Properties. Instead,
I've added a button to edit the form. You click the button, which
temporarily unlocks the form, make your changes and click the same button
when you're finished making changes. The code for this function wasReference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/10559-save-record-button-not-working-after.html
provided to me by someone (from this board, I think) about 2 years ago for
another DB I was working on. I copied and pasted the code to the current DB
I'm working on.
Now, the "Edit" button works fine, but the "Save Record" button doesn't
work. I keep on getting an error message saying that the save feature "...is
not available at this time". I added the "Save Record" button using the
auto-Wizard that appears when you create a new button.
Here's some relevant code:
1) The "Edit" button:
Private Sub EditRecord_Click()
If Me.EditRecord.Caption = "Edit Record" Then
.AllowAdditions = True
.AllowEdits = True
.AllowDeletions = True
Me.EditRecord.Caption = "Ok"
.AllowAdditions = False
.AllowEdits = False
.AllowDeletions = False
Me.EditRecord.Caption = "Edit Record"
2) The "Save Record" button:
Private Sub Bttn_Save_Record_Click()
On Error GoTo Err_Bttn_Save_Record_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
MsgBox Err.DescriptionReference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10559
Any input is greatly appreciated.
Viken K. http://www.vikenk.com