473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to turn my "Edit" button into a "Stop Editing" button

I have AllowEdits set to False on my form. To avoid unwanted changes in the form I have created a button to allow editing only when it is pressed and it works great.
Now I'm wondering if there is a way to make my button turn into a Stop Editing button so that people can click it when they are done making changes to the form.

Code for Edit button:
Expand|Select|Wrap|Line Numbers
  1. Private Sub btn_Edit_Click()
  2.    Me.AllowEdits = True
  3.    Me.btn_Edit.Caption = "Editing"
  4. End Sub
  5.  
  6. Private Sub Form_Current()
  7.    Me.AllowEdits = False
  8.    Me.btn_Edit.Caption = "Edit"
  9. End Sub
Sep 28 '12 #1
1 1718
Rabbit
12,516 Expert Mod 8TB
Please use code tags when posting code.

Use the If Then Else syntax to create a toggle.
Sep 28 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Matt | last post by:
I want to understand the difference between submit button and regular button: <input type="submit"> and <input type="button">. My understanding is that submit button will send the entire HTML form...
2
by: Ester | last post by:
Instead of drag and drop image button from Toolbox and name the image button id on the properties box, I would like to load image button ID from database. I created a database table that stores...
0
by: Dharmesh | last post by:
Hi every1, I have two buttons on a webform and I want to make one button as a default button. But when I view the page in browser its the wrong button which is getting the default property. ...
3
by: Vern | last post by:
I have a custom button control that compares the user security level to the buttons security level property. If the user level is greater than the button level, then the button is enabled, else it...
2
by: TonyVal - MSDN News | last post by:
Hi All, Anyone know how to change color for a 3D button like this button control does? http://www.econtechvn.com/en/aquabutton_detail.htm I see it is really cool. But, don't know how to do...
3
by: Mel | last post by:
Hi, Is there any way I can force to change button background colour when toggle button is checked? Just like button change its background colour when mouseover in MS Visual Studio.NET. I hope I...
3
oranoos3000
by: oranoos3000 | last post by:
hi i'm a beginer javascript would you please help me i d like to findout this page has next page or previous page in history object i use this line of code if(window.history.length>0) and with...
1
by: tvnaidu | last post by:
Currently I am using power on switch on computer, I would like to use power strip switch to turn on or off computer instead power switch on computer, can I do that?. do I have to setup something in...
0
by: jagdeep gupta | last post by:
what is difference between using button as command button and as push button. If i use it as PushButton and call the event OnClick and In case of Command button i call OnCommmand event and same work...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.