473,569 Members | 3,035 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disable Me.Dirty Access 2002

Okay all you GURUS out there... here's the skinny... I need a way to
prevent the Me.Dirty event to trigger after a FORM_OPEN event. What I
have is a field that is dependent on another field that determines it's
value. In short, here's is the code (in a simple presentation) that
will trigger the Dirty event (comments added to preserve formating):

'Private Sub Form_Open(Cance l As Integer)
'~~~~~~~~
'Good code Here
'~~~~~~~~
'
' If DDyear <> "" Then
' If DDyear = Format(Date, "yyyy") Then
' d1 = 4
' dde.Caption = "4"
' ddr.Caption = "4"
' Else
' d1 = 2
' dde.Caption = "2"
' ddr.Caption = "2"
' End If
' Else
' d1 = 0
' dde.Caption = "4"
' ddr.Caption = "4"
' End If
' DoCmd.Save
' Me.Dirty = False
'
'Exit_Form_Open :
' Exit Sub
'
'Err_Form_Open:
' MsgBox "YOU DO NOT HAVE PERMISSION TO USE THIS DATABASE AT THIS
TIME"
' DoCmd.Quit
' Resume Exit_Form_Open
'End Sub
'
'Private Sub Form_BeforeUpda te(Cancel As Integer)
' If Me.Dirty Then
' Me.DateUpdated = Format(Now(), "dd-mmm-yy")
' End If
'End Sub

Because I set the value of d1, this will trigger the dirty event. I
have tried to SAVE the record to reset Me.Dirty and I tried to set it
to FALSE. Is there another way?

I think I may need to create more conditional statements so that if
d1=2 and I meet the requirements of the ELSE, then I don't need to
reset d1 to 2. Hey, I may have already solved this...

But, in essence, can you temporarily disable the DIRTY event? Thanks in
advance for addressing this...

Rusty I. Peace

Nov 13 '05 #1
1 3602
You might be able to stop the Dirty event from firing by temporaritly
setting the ControlSouce property of the control to an empty sting and then
back.

Darryl Kerkeslager
<RI****@hotmail .com> wrote
Okay all you GURUS out there... here's the skinny... I need a way to
prevent the Me.Dirty event to trigger after a FORM_OPEN event. What I
have is a field that is dependent on another field that determines it's
value. In short, here's is the code (in a simple presentation) that
will trigger the Dirty event (comments added to preserve formating): [snip]
But, in essence, can you temporarily disable the DIRTY event? Thanks in
advance for addressing this...

Nov 13 '05 #2

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

Similar topics

15
24788
by: Rey | last post by:
Howdy all. Appreciate your help with several problems I'm having: I'm trying to determine if the Visit subform (subformVisits) has a new record or been changed, i.e. dirty. The form that contains the subform is named Clients. I have this code in the Add Client btn: If Forms!Clients.subformVisits!VisitDirty = True Then MsgBox "Visit...
3
1557
by: D.M | last post by:
In the Access 2002 mdb database I want to disable creating MDE files. Thanks in advance.
2
4449
by: Salad | last post by:
A97. I have a command button to save and exit. I had the code If Me.Dirty Then Docmd.RunCommand acCmdSaveRecord ...more code endif I was getting an error because a value was not getting set in the BeforeUpdate event. So I changed it to
6
3722
by: PerryC | last post by:
I have search googles and there are hundreds of tips about AllowByPassKey... however, none works for me... well, perhaps I am too new to such high level functionality that it just does not make sense to me. So, anyone please help. I have no idea what is "CreateProperty" that Access help was trying to tell me to do. Can anyone please write...
3
3028
by: James P. | last post by:
Hello, How do I disable the Enter key so that it does not generate a new blank form when I hit the Enter key? I tried Tools - Options - KeyBoard: select "Don't Move" in "Move After Enter" section but it did not work. Access Help talked about a property called "EnterKeyBehavior" but it seems like it only applies to a field. Please help,...
4
2074
by: Paul T. RONG | last post by:
Dear All, I add two new tables to the database and then the disable shift key codes don't work. These two new tables are actually created by two queries, and only these two are in the front end, I didn't manage to move them to the back end. I work with Access 2k under Win XP. these are the codes that don't work (it worked for more than a...
7
11011
by: Mark | last post by:
Help, please!! I am running MS Access 2000. I copied code from Michael Kaplan's website (see below) to disable the shift key for all non-admin users. I pasted the code into a new function. I then created a macro, used the Run Code command and selected my function. When I select the function in the Expression Builder, it appears as:
9
15843
by: Susan Bricker | last post by:
I am currently using the OnDirty event of a Form to detect whether any fields have been modified. I set a boolean variable. Then, if the Close button is clicked before the Save button, I can put up a message on the screen that will tell the user that "Data has been changed, do you wish to Save the record before Closing this window?" I...
3
4590
by: Rick Shaw | last post by:
Hi, can anyone help? I am fairly new to C# and need help with a functionlity in my app. What I need to accomplish is to be able to enable the SAVE button as soon as the user modifies a data in the form. Data could be in a datagridview or textbox. All data are connected to the tables/dataset. What is the easiest way to do this? Thank...
0
7703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7930
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7681
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7983
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5228
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3662
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.