Dirty Question

Dirty Question

Hello,

I have a question about the Dirty property/event=85

The following code will evaluate to False (which makes sense) when the
record changes:
-----------
Private Sub Form_Current()
Debug.Print Me.Dirty
Call IsRecordDirty
End Sub

The following code will evaluate to True (which does not make sense to
me) when the record changes:
--------------
Private Function IsRecordDirty() 'tied to the on dirty event of all
text/combo boxes
Debug.Print Me.Dirty
End Function

In the Immediate Window I see:
False
True

Next Record:
False
True

Why is me.dirty false in one sub and true in another sub/function when
nothing changes?

Thanks,
alex
0
alex
2/25/2010 2:14:13 PM
access 16762 articles. 2 followers. Follow

1 Replies
883 Views

Similar Articles

[PageSpeed] 40

Alex -

I don't know unless the code has different scope (e.g. form versus subform) 
or something.  Why don't you put a Debug.Print Me.Name before each of your 
Debug.Print Me.Dirty and see what it gives?

-- 
Daryl S


"alex" wrote:

> Dirty Question
> 
> Hello,
> 
> I have a question about the Dirty property/event…
> 
> The following code will evaluate to False (which makes sense) when the
> record changes:
> -----------
> Private Sub Form_Current()
> Debug.Print Me.Dirty
> Call IsRecordDirty
> End Sub
> 
> The following code will evaluate to True (which does not make sense to
> me) when the record changes:
> --------------
> Private Function IsRecordDirty() 'tied to the on dirty event of all
> text/combo boxes
> Debug.Print Me.Dirty
> End Function
> 
> In the Immediate Window I see:
> False
> True
> 
> Next Record:
> False
> True
> 
> Why is me.dirty false in one sub and true in another sub/function when
> nothing changes?
> 
> Thanks,
> alex
> .
> 
0
Utf
2/25/2010 4:46:01 PM
Reply:

Similar Artilces:

Taskbar Outlook Question
I have an Outlook icon next to the clock right hand lower corner. How do I delete it? I already have one in my taskbar. Thanks, david You can't but you can customize you're Notification Area to hide it or rightclick it and choose "Hide when minimized" to remove it from the Taskbar. -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -Properly back-up and restore your Outlook data -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "david" <chevie@mail.com> wrote in message news:jdeRd.50484$Th1.39608@bgtnsc04-ne...

simple question about BSTR and CString
Hello! If we pass a BSTR parameter named bstrIDs into a method and in this method we do CString cstrIDs = bstrIDs; what does this mean ? Does it mean that cstrIDs is pointing to the same memory as bstrIDs is poining to ? Is it correct that when you use CString you don't have to allocate memory ? //Tony Tony Johansson wrote: > Hello! > > If we pass a BSTR parameter named bstrIDs into a method and in this > method we do CString cstrIDs = bstrIDs; > what does this mean ? > > Does it mean that cstrIDs is pointing to the same memory as bstrIDs is > poining to ?...

Windows XP and New Computer Questions
I wanted to ask a couple questions and ask for your opinions here. My computer is 7 years old. The processor is slow and the memory has been upgraded to the limit. I'm considering purchasing a new computer. I'm using Windows XP Home Edition on this computer. I have heard that it's hard or impossible to upgrade XP to the new Windows 7. Is that correct? Also, I have some older programs I use frequently that I'm afraid won't work on Windows 7. So I'm looking into buying a computer (used if I have to) that has Windows XP. This is probably a dumb que...

Portfolio Server Question
All, I'm using portfolio server 2007 and have been given a business problem. Our IT organization is the main user of PPS. However, if I turn the solution into a hosted one (for external customers), I'm presented with 2 options: 1) create multiple accounts (one per organization) or 2) use one account and multiple organizations. Option #1 is unacceptable to our customers (because the system forces dual logins), so we're thinking option #2 might work. If someone knows how to make option 1 work with Active Directory logins, I'm all ears. Option #2 only works if my c...

Xsd question #2
I developed a schema that uses the following for schema settings: elementFormDefault="qualified" xmlns:at=http://www.mycompany.com targetNamespace="http://www.mycompany.com" The goal is to namespace the my elements with "at" - example is at:myElementName. I use xsd to build a class. I then use the class to add data and then use the XmlSerializer to serialize the class. When I look at the Xml stream generated from the serialization, I do not see my target name space prefixed to the elements. How can I serialize and get the target namespace to appear on the ...

3.0 email question
How does one troubleshoot sending emails from CRM 3.0. I don't seem to be able to send email from the system. It records it in the History of my contact as sent but it never gets therea and there are no error messages when I click send. During the installation, I seem to remimber it asking me about some SMTP settings but I cant figure out how to modify or even confirm that I have the right information. The first step would be to look at the Event Log on the server to see if there are any error messages. Also, do you have access to Customer/Partner source. There is information ...

Me.Dirty
Okay, Here is the setup of this monster database that we're using. We have an Access frontend with SQL server backend. We have about 14 tables that all link to one main table via main table's PK. To present this data, we have forms that have 14 sub-forms on them (long story, but in order to get what we needed, this was how we got it to work). We have the SQL server residing on one server and then six laptops connect to that server via wireless router (again, due to the mobility of the laptops, it has to be wireless). So at one time, there are six users entering data, but never ...

Drop Down List Question!
How do I go about having a drop down list in a invoice so as it will link up with a name and address on another sheet. Sheet (Address) has name and address in A1, A2, A3, A4, A5. Then in Sheet Invoice I want to have a drop down list then select and the next 4 cells fall below to complete a invoice address! -- Thanks in advance for your help....Bob Vance .. .. .. .. Hello Select the cells of your address (A1:A50) in Sheet Address Then | Insert| Name | Define give a name - for eg: "add" Now in your Invoice Sheet, go to the cell where you want the address to be printed Data | V...

Question for the gurus.
How can I make my spreadsheet automatically jump to the next cell when I scan into it? The input comes from a scanner, patched into the keyboard, that reads bar codes. I want to scan into cell "A1", then have the cursor move to cell "B1". And after the data is entered into cell "B1", the cursor drops down to "A2". I know this has to be a simple command.:confused: Anyone have a clue? --- Message posted from http://www.ExcelForum.com/ In tools=>Option=>Edit Tab, under Move Selection After Enter, do you have Down selected? -- Regards, Tom Og...

POS2009 questions
I am using RMS right now and will be getting pos2009 In RMS we use alot of Macros, custom menu, touch screen, custom buttons, net display, new item wizard and reports are those all available in pos2009? what features are not availabe in pos2009 that are in RMS. And what features are new? is there a news group for ppos2009? Do we upgrade from RMS or have to install a fresh copy and add the database itmes? or you can do both? Is microsoft going to drop one of the programs? Stick with RMS there are many things that you will regret losing with a move to POS2K9. RMS has had its ...

Grid Line Question
Hello, Let's see if I can explain this clearly, as I imagine it's against the groups protocal to post a small graphic clip showing it. Or is it ? I have graph with the vertical axis labeled 60, 80, 100, etc. I have the horizontal grid lines going from these 60, 80, 100, etc. I have ticks marks, also, at 70, 90 110, etc. (no axis labels here; just the ticks) Can I also have horiz. grid lines extending from 70, 90, 110, but Not have numerical axis values for them ? Just horiz grid lines extensions from these Ticks ? Thanks, Bob You can add another series to the chart with the...

GetNumberFormat() Question
I am using the GetNumberFormat() function with a clip of code from Locale Explorer, thanks to Joe Newcomer.. sorta like this: CString csValue contains the numerical string upon entry ...... { /* GetNumberFormat */ int length = ::GetNumberFormat(lcid, 0, csValue, NULL, NULL, 0); if(length == 0) { /* error */ DWORD err = ::GetLastError(); return false; // .. handle error here } /* error */ else { /* valid length */ LPTSTR p = Number.GetBuffer(length); if(::GetNumberFormat(lcid, 0, csValue, NULL, p, length) == 0) { /* failed */ DWORD err...

Bar chart question?
I have a list with names and values as follows: A B Law 22 Low 5 and so on for 34 rows. But the list can very in size. I have a chart that takes the data from this list, but I can only have the source "1 to 34" rows. Is there a way that the chart veries with the size of the list? -- Bob You need to explore the concept of 'dynamic chart' Start here: http://peltiertech.com/Excel/Charts/Dynamics.html If you need more Google <excel dynamic chart' If you have Excel 2007, it is every easy: just select the data used for the chart and make it...

Questions on vcredist_x86.exe ?
Hi Experts: I have a few questions on running the VC redistribution package vcredist_x86.exe: After playing with it a few times on different machines, it seems to me that vcredist_x86.exe generated either one of the directories below: x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700 x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_none_10b2f55f9bffb8f8 Anyone knows why it generate different directory on different runs and what the "1fc8b3b9a1e18e3b", "x-ww_6b128700" and "none_10b2f55f9bffb8f8" mean? Thanks in advance! Polaris ...

Form Dirty Property
I am having difficulty in exploiting the ‘On Dirty’ property of forms. Sometimes it works as expected but, more often than not, changes to controls bound to table fields fail to trigger the On Dirty event. I am then forced to associate each amendable control with an After Update event. That invariably works but, with a dozen or more amendable controls on a form, the resulting code can look pretty clumsy. There is something that I have clearly not understood. Can anyone enlighten me? I just want to take appropriate action when any control on a form is updated or amended. -- Peter ...

File question
hello, whats the maximum bytes( or MB) we can store in a single file(*.txt)? thru VC++ application. are there any limits? thanks for information! -- -- Thanks, Arvind Arvind wrote: > hello, > > whats the maximum bytes( or MB) we can store in a single file(*.txt)? > > thru VC++ application. are there any limits? > > thanks for information! > > -- > > -- > Thanks, > > Arvind Depends on the OS. XP allows files as big as the volume size, although you'll start experiencing oddities as you get under the threshold for free space. what about w...

Publisher CD Template Question
I have Publisher 2002. I have a template in a publisher document that can be used to print on a CD Label. The circle with the information I want to print on the label is not lined up with the label when I print it out. I can't get the Circle with all the information on it to move. I have clicked on it and the little move icon comes up but when I try to move the whole thing I just get an outline of the circle moving not the actual whole thing with all the information on it. What am I doing wrong The circle is hard coded. Group everything together (Edit, select all) and nudge it to a...

inbox question.
I have Outlook 2002 on my computer. When I start outlook it takes a long time to get started. I wait 5 mins then I check and I notice in XP that in the app box Isee I have 2 inboxs for outlook and when I click on one outlook crashes I have win xp . what do I need to do? Cliff ...

How To Talk Dirty
Hi, Really cool to learn, but it's true for all dudes. 'How To Talk Dirty' (http://www.howtotalkdirty101.com) Talk Dirty -- womenops ...

a number of questions re: outlook
I have a number of questions regarding the functionality of outlook (2000), which I am currently using. 1) it is possible to organise contacts in the outlook or personal address book by 'group'. I have a lot of email addresses I want to transfer across from Outlook Express and I don't really want them organised as one big list. if not, is it possible to get a plugin address book that does? 2) filtering tasks is it possible to write a task filter like the following - "all tasks starting in next week OR in progress" when you add multiple filter criteria to the filters int...

Question on changing the function of the arrow keys
I use the arrow keys to move between selected cells; however, every onc in great while after peforming various pivot tables and formatting, m arrow keys will now move the scrollbar :confused: and I can't figur out what I've pressed or done to cause this change. It is ver annoying when it happens to say the least. Does anyone know how you make the arrow keys go back to moving betwee selected cells rather than the scroll bar -- uberbla ----------------------------------------------------------------------- uberblah's Profile: http://www.excelforum.com/member.php?action=getinfo...

IF formula question
I need to write a formual for the following: IF J1=R and L1= 3221 OR 3223 then N1 should be FALSE J1 could be either R or C and L1 could be any numer of codes, but I need to know which rows have an R and 3221 or an R and 3223. What's the easiest way to write this? =IF(AND(J1="R",OR(L1=3221,L1=3223)),FALSE,"Whatever you want N1 to be if your condition isn't met"). -- David Biddulph "charlie" <charlie@discussions.microsoft.com> wrote in message news:E6D6C32E-CC8B-4A2F-A4B5-EF243A9B042C@microsoft.com... > I need to write a form...

dirty (?) footer
I have a form with several unbound field in it's footer (they will, after verification, be added to the recordset); I thought it would be nice to keep the "ADD" button disabled until the user has entered info into all of the fields... is there a simple way to add a check for this condition (all fields have data entered) on dirty... if len(field1 + field2 + field3 + ...) > 0 then me.add.enabled = true else me.add.enabled = false end if thanks in advance, -mark On Feb 20, 2:58 pm, "mark kubicki" <m...@tillotsondesign.com> wrot...

Question about serializing...
I've currently got a database structure which is something like:- class a - member type - effective date and:- class b - client name What I really want to do is to serialize as:- <classb> <effectivedate>date</effectivedate> <clientname>clientname</clientname> </classb> Is there a way to split the serializing in this way that the child rather than the parent does the serializing? Thanks Maybe if you subscribe to the UnknownElement event of your serializer, you can assign EffectiveDate to ClassBInstance.Parent.EffectiveDate. Just be ca...

Microsoft Query question
I am trying to use Microsoft Query to get data from my SQL 2000 databases. The problem is that I have a few columns with names that conflict with keywords (like Identity). (Yes. I kow that keywords should be avoided but it is done and cannot be changed.) This is causing a keyword syntax error within the Query application. Oddly enough, even if I do not select the column the error still appears. And when you look at all the columns available, the keyword named column shows up in boldface. When I am doing queries in other programs I put square ("[ ]") brackets around column and table...