473,387 Members | 1,453 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,387 software developers and data experts.

Changing form properties with a button

Hello,

I currently have a subform that displays four fields from a query. I have
the subform's properties set as follows, so that the end users can not
accidently change the data.

Allow Edits = NO
Allow Deletions = NO
Data Entry = NO

I would like to have a 'EDIT' button that would change the form properties
to YES to allow intentional editing of the data, and then a 'Save' button
that would save the edited record and change the form properties back to NO.

Can somebody help with this?

Thanks!

Tim
Nov 13 '05 #1
1 5206
Put the following code in the Click event of the Edit button:
Me.AllowEdits = True
Me.AllowDeletions = True

Note - Data Entry hasnothing to do with whether you can edit or delete
records. When Data Entry is set to Yes, the form opens to a new record and
you can not navigate to existing records.

Put the following code in the Click event of the Save button:
DoCmd.RunCommand acCmdSaveRecord
Me.AllowEdits = False
Me.AllowDeletions = False
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Tim Graichen" <Tg*******@neo.rr.com> wrote in message
news:hr******************@fe1.columbus.rr.com...
Hello,

I currently have a subform that displays four fields from a query. I have
the subform's properties set as follows, so that the end users can not
accidently change the data.

Allow Edits = NO
Allow Deletions = NO
Data Entry = NO

I would like to have a 'EDIT' button that would change the form properties
to YES to allow intentional editing of the data, and then a 'Save' button
that would save the edited record and change the form properties back to NO.
Can somebody help with this?

Thanks!

Tim

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Free-Ed, Ltd. | last post by:
I am going nuts trying to find a paragraph in a book that described how to change the text content (HTML) in a DIV. Actually I have an array of HTML strings that I want to drop into the DIV,...
5
by: David Deacon | last post by:
Hi i was given the following advise,below my OriginalQuestion I am a little new to ADOX can you direct me to the following Do i place the code behind a button on a form? Or do i place it in the...
3
by: Jeff | last post by:
Hi I have a report with a graph on it and want to change the minimum and maximum values for the value axis when it is previewed. This can't be done by adding code in the Open event as once the...
1
by: Susan Bricker | last post by:
Greetings. I am trying to position opened forms so that they are cascaded on the screen. I have discovered the movesize action (for the DoCmd) and Move property of a form (for Acc 2002/2003). ...
1
by: Firewalker | last post by:
I am attempting to change the backColor property on the previously instantiated buttons FROM a listbox_doubleClick event. I thought it would be something like this: If...
7
by: Sakharam Phapale | last post by:
Hi All, How to preserve the old font properties while changing new one? I posted same question 2 months back, but I had very small time then. eg. "Shopping for" is a text in RichTextBox and...
4
by: Francis | last post by:
Hello i have a continuos form, and i have a command button to help insert information on a control textbox. But when the text box is not null, i dont want the command button to show (to the current...
6
by: andrew.ames | last post by:
Hi I have a pretty basic windows application created in Visual Studio 2005 and VB.NET. I set my Form's font to Arial 8.25pt, so when i added a label and a button they automatically have a...
8
by: mike_solomon | last post by:
I have a button <input type="submit" name="Delete" value="Delete"> This code can not be changed I want to use Javascript to change the type I tried:
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.