Sign Up |  Live StatsLive Stats    Articles 37,470| Comments 178,714| Members 19,496, Newest harshith| Online 486
Home Contact
 (Forgotten?): 
    10 years of Excellence
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




Click Here to Register/Sign Up Daily Hukamnama Member Blogs Downloads Website Navigation Help Fonts Tags
Sikh Philosophy Network » Sikh Philosophy Network » Current News » Information Technology » "Save Record" button not working after adding "Edit" button.

"Save Record" button not working after adding "Edit" button.

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 500 USD, Received: 0 USD (0%)
Please Donate...
     
Related Topics...
Thread Thread Starter Forum Replies Last Post
"On Click" from Button won't run code in Access 2007 (2000 db) st Information Technology 2 28-Jul-2006 08:25 AM
Is "PRINT BUTTON" available on the MESSAGE BOX ? Martin \(Martin Lee\) Information Technology 3 28-Jul-2006 08:15 AM
Re: How to show the "fields list button" , by VBA ? Martin Information Technology 0 18-Nov-2005 14:00 PM
How to show the "fields list button" again, by VBA ? Martin Information Technology 1 18-Nov-2005 13:59 PM
Where is "refresh" button on the field list toolbar? Cruiser Information Technology 5 08-Nov-2005 12:53 PM


Tags
adding, button, edit, quoteditquot, quotsave, recordquot, save record, working
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:13 AM
Viken Karaguesian's Avatar Viken Karaguesian
Guest
 
Posts: n/a
   
   
"Save Record" button not working after adding "Edit" button.

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
Hello all,

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 was
Reference:: 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
With Me
.AllowAdditions = True
.AllowEdits = True
.AllowDeletions = True
End With

Me.EditRecord.Caption = "Ok"
Else
DoCmd.Save
With Me
.AllowAdditions = False
.AllowEdits = False
.AllowDeletions = False
End With
Me.EditRecord.Caption = "Edit Record"
End If
End Sub


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

Exit_Bttn_Save_Record_Click:
Exit Sub

Err_Bttn_Save_Record_Click:
MsgBox Err.Description
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10559
Resume Exit_Bttn_Save_Record_Click

End Sub


Any input is greatly appreciated.

--
Viken K.
http://www.vikenk.com






Do you agree or disagree with the writer above? Why not share your immediate thoughts with us! Login Now! or Sign Up Today! to share your views... Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:14 AM
Arvin Meyer [MVP]'s Avatar Arvin Meyer [MVP]
Guest
 
Posts: n/a
   
   
Re: "Save Record" button not working after adding "Edit" button.

Try this and see if it works for you:

Private Sub EditRecord_Click()
If Me.EditRecord.Caption = "Edit Record" Then
With Me
.AllowAdditions = True
.AllowEdits = True
.AllowDeletions = True
.EditRecord.Caption = "Save"
End With

Else
DoCmd.RunCommand acCmdSaveRecord
With Me
.AllowAdditions = False
.AllowEdits = False
.AllowDeletions = False
.EditRecord.Caption = "Edit Record"
End With
End If
End Sub
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

"Viken Karaguesian" wrote in message
news:xYSdneGv4YfFU-HZnZ2dnUVZ_sGdnZ2d@comcast.com...
> Hello all,
>
> 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 was
> 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
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10559
> With Me
> .AllowAdditions = True
> .AllowEdits = True
> .AllowDeletions = True
> End With
>
> Me.EditRecord.Caption = "Ok"
> Else
> DoCmd.Save
> With Me
> .AllowAdditions = False
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10559
> .AllowEdits = False
> .AllowDeletions = False
> End With
> Me.EditRecord.Caption = "Edit Record"
> End If
> End Sub
>
>
> 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
>
> Exit_Bttn_Save_Record_Click:
> Exit Sub
>
> Err_Bttn_Save_Record_Click:
> MsgBox Err.Description
> Resume Exit_Bttn_Save_Record_Click
>
> End Sub
>
>
> Any input is greatly appreciated.
>
> --
> Viken K.
> http://www.vikenk.com
>
>



Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:14 AM
Viken Karaguesian's Avatar Viken Karaguesian
Guest
 
Posts: n/a
   
   
Re: "Save Record" button not working after adding "Edit" button.

  Donate Today!  
Arvin,

Worked like a charm. Thanks!

--
Viken K.
http://www.vikenk.com


"Arvin Meyer [MVP]" wrote in message
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10559
news:udrvn6EhGHA.5068@TK2MSFTNGP05.phx.gbl...
> Try this and see if it works for you:
>
> Private Sub EditRecord_Click()
> If Me.EditRecord.Caption = "Edit Record" Then
> With Me
> .AllowAdditions = True
> .AllowEdits = True
> .AllowDeletions = True
> .EditRecord.Caption = "Save"
> End With
>
> Else
> DoCmd.RunCommand acCmdSaveRecord
> With Me
> .AllowAdditions = False
> .AllowEdits = False
> .AllowDeletions = False
> .EditRecord.Caption = "Edit Record"
> End With
> End If
> End Sub
> --
> Arvin Meyer, MCP, MVP
> Microsoft Access
> Free Access downloads
> http://www.datastrat.com
> http://www.mvps.org/access
>
> "Viken Karaguesian" wrote in message
> news:xYSdneGv4YfFU-HZnZ2dnUVZ_sGdnZ2d@comcast.com...
>> Hello all,
>>
>> 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 was
>> 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
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10559
>> 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
>> With Me
>> .AllowAdditions = True
>> .AllowEdits = True
>> .AllowDeletions = True
>> End With
>>
>> Me.EditRecord.Caption = "Ok"
>> Else
>> DoCmd.Save
>> With Me
>> .AllowAdditions = False
>> .AllowEdits = False
>> .AllowDeletions = False
>> End With
>> Me.EditRecord.Caption = "Edit Record"
>> End If
>> End Sub
>>
>>
>> 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
>>
>> Exit_Bttn_Save_Record_Click:
>> Exit Sub
>>
>> Err_Bttn_Save_Record_Click:
>> MsgBox Err.Description
>> Resume Exit_Bttn_Save_Record_Click
>>
>> End Sub
>>
>>
>> Any input is greatly appreciated.
>>
>> --
>> Viken K.
>> http://www.vikenk.com
>>
>>

>
>



Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Active Discussions
Can Sikhs worship...
Today 14:16 PM
40 Replies, 438 Views
Would an Atheist Pray in...
Today 13:57 PM
63 Replies, 5,328 Views
Nice Punjabi Songs with...
Today 08:50 AM
19 Replies, 534 Views
Sikh Philosophy Network...
Today 04:13 AM
18 Replies, 855 Views
Rozana Reports (ਪੰਜਾਬੀ...
Today 03:39 AM
410 Replies, 9,468 Views
Thought of the Moment!
Today 00:06 AM
116 Replies, 6,140 Views
English Sri Guru Granth Sahib Ji Translations
Yesterday 23:30 PM
6 Replies, 115 Views
Sikh Spokesman (ਪੰਜਾਬੀ...
Yesterday 21:25 PM
256 Replies, 6,080 Views
Difference in Bowing...
By Kamala
Yesterday 15:08 PM
11 Replies, 283 Views
What Really Happened on...
Yesterday 12:46 PM
13 Replies, 255 Views
Free Online Gurbani...
Yesterday 03:56 AM
13 Replies, 4,348 Views
English Sri Guru Granth...
Yesterday 03:51 AM
5 Replies, 185 Views
Edward Snowden: the...
Yesterday 03:34 AM
3 Replies, 198 Views
What Is Difference...
18-Jun-2013 09:18 AM
6 Replies, 185 Views
First There is Water by...
By Ishna
18-Jun-2013 05:03 AM
3 Replies, 194 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 15:23 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.47424 seconds with 32 queries