Me.Dirty - Where to put this logic?

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 working on the same
person at the same time.  Lately we've been experiencing, what seems to be a
common error, the write conflict error where the only options are Save, Copy
to Clipboard or Drop Changes.  With me so far?  

Okay, so it is my understanding that as a user tabs through the form and
fills out the appropriate text boxes, check boxes, and option buttons, the
record does not save until the form is closed, correct?  This is when the
record is considered "dirty," it's there but not written to SQL.  In doing
some research, it looks like I need to utilize the following logic:

    If Me.Dirty = True Then
        Me.Dirty = False
    End If

My question is where to do I put this?  Do I put in in the OnExit event of
the subform?  Does it go in each AfterUpdate event for each control on the
form (this would be ridiculous (there's thousands))?  Does it go in the
AfterUpdate event of the main form?  With this setup, I can set many places
to put it, I just need to make sure it's in the right spot so the error goes
away.  Please let me know.

Thanks in advance!

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200703/1

0
ar013871
3/13/2007 10:02:32 PM
access.forms 6864 articles. 2 followers. Follow

6 Replies
1239 Views

Similar Articles

[PageSpeed] 15

In news:6f2357ee0d2e1@uwe,
ar013871 via AccessMonster.com <u23484@uwe> wrote:
> 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 working on the same
> person at the same time.  Lately we've been experiencing, what seems
> to be a common error, the write conflict error where the only options
> are Save, Copy to Clipboard or Drop Changes.  With me so far?
>
> Okay, so it is my understanding that as a user tabs through the form
> and fills out the appropriate text boxes, check boxes, and option
> buttons, the record does not save until the form is closed, correct?
> This is when the record is considered "dirty," it's there but not
> written to SQL.  In doing some research, it looks like I need to
> utilize the following logic:
>
>    If Me.Dirty = True Then
>        Me.Dirty = False
>    End If
>
> My question is where to do I put this?  Do I put in in the OnExit
> event of the subform?  Does it go in each AfterUpdate event for each
> control on the form (this would be ridiculous (there's thousands))?
> Does it go in the AfterUpdate event of the main form?  With this
> setup, I can set many places to put it, I just need to make sure it's
> in the right spot so the error goes away.  Please let me know.

When the focus changes from the main form to a subform, the main form's 
record will be saved automatically if the form is dirty.  When the focus 
changes from a subform to the main form, the subform's record will be 
saved automatically, if the subform is dirty.  So there's no point in 
trying to save records as you switch between main form and subform.

Is it taking the users a long time to fill out the form or subform, so 
that the record remains dirty for a long time?  You say that the users 
are never "working on the same person at the same time."  Given that you 
have a SQL Server back-end, I'm not sure why you're getting write 
conflicts, unless "working on a person" involves updating records that 
may be in common between two "persons".  That is, unless your problem 
isn't really one of true write conflicts, but rather a configuration or 
data problem that is causing Access to *think* there's a write conflict 
when there really isn't.  Do you get these conflict messages all the 
time, or only occasionally?  Do they really seem to correspond to 
situations where users are updating the same records?

-- 
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


0
Dirk
3/14/2007 1:34:58 AM
It wouldn't surprise me if it is taking users a long time to fill out the
form.  Not because the form is too long or complicated, it is because they
are doing health screenings of kids while they're entering the data.  When we
first started to get the error, it was sporratic.  Then when we shut down the
six computer and just worked on the application that is on the server we even
got the error.  Since each kids goes to a different station, the record
dealing with that kid is only open at one time.  I don't think there would be
any commonality between the users and the records they have pulled up.  

I've tried including the timestamp that has been suggested in a lot of forums
and this change doesn't seem to resolve the write conflict error either.  I
do not have any fields that are bit size.  Is there anything else that I am
missing?  I do have memo fields, but I really do not want to have to break
those down to seperate tables or change them to text fields.  We get a lot of
school nurses who can be wordy and the memo field helps.  

We've received the error when opening up a form (i've incorporated a search
feature that returns results in a list box - user can double click on the
record or select the open form button to open it up) and we've seen the error
when a user was trying to enter data.  I'm stumped!  

I've even seen forums where they say this is a known bug for Access and to
deal with it, however, I would really like to exhaust all outlets before
concluding that.  Would the wireless connection play a part?  Would it help
to be wired?  I feel like I'm grasping for straws.  :-)

Dirk Goldgar wrote:
>> Okay,
>>
>[quoted text clipped - 28 lines]
>> setup, I can set many places to put it, I just need to make sure it's
>> in the right spot so the error goes away.  Please let me know.
>
>When the focus changes from the main form to a subform, the main form's 
>record will be saved automatically if the form is dirty.  When the focus 
>changes from a subform to the main form, the subform's record will be 
>saved automatically, if the subform is dirty.  So there's no point in 
>trying to save records as you switch between main form and subform.
>
>Is it taking the users a long time to fill out the form or subform, so 
>that the record remains dirty for a long time?  You say that the users 
>are never "working on the same person at the same time."  Given that you 
>have a SQL Server back-end, I'm not sure why you're getting write 
>conflicts, unless "working on a person" involves updating records that 
>may be in common between two "persons".  That is, unless your problem 
>isn't really one of true write conflicts, but rather a configuration or 
>data problem that is causing Access to *think* there's a write conflict 
>when there really isn't.  Do you get these conflict messages all the 
>time, or only occasionally?  Do they really seem to correspond to 
>situations where users are updating the same records?
>

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200703/1

0
ar013871
3/14/2007 3:31:11 AM
Would splitting the database help?  I've never done this before, is the
process easy?

ar013871 wrote:
>It wouldn't surprise me if it is taking users a long time to fill out the
>form.  Not because the form is too long or complicated, it is because they
>are doing health screenings of kids while they're entering the data.  When we
>first started to get the error, it was sporratic.  Then when we shut down the
>six computer and just worked on the application that is on the server we even
>got the error.  Since each kids goes to a different station, the record
>dealing with that kid is only open at one time.  I don't think there would be
>any commonality between the users and the records they have pulled up.  
>
>I've tried including the timestamp that has been suggested in a lot of forums
>and this change doesn't seem to resolve the write conflict error either.  I
>do not have any fields that are bit size.  Is there anything else that I am
>missing?  I do have memo fields, but I really do not want to have to break
>those down to seperate tables or change them to text fields.  We get a lot of
>school nurses who can be wordy and the memo field helps.  
>
>We've received the error when opening up a form (i've incorporated a search
>feature that returns results in a list box - user can double click on the
>record or select the open form button to open it up) and we've seen the error
>when a user was trying to enter data.  I'm stumped!  
>
>I've even seen forums where they say this is a known bug for Access and to
>deal with it, however, I would really like to exhaust all outlets before
>concluding that.  Would the wireless connection play a part?  Would it help
>to be wired?  I feel like I'm grasping for straws.  :-)
>
>>> Okay,
>>>
>[quoted text clipped - 19 lines]
>>time, or only occasionally?  Do they really seem to correspond to 
>>situations where users are updating the same records?

-- 
Message posted via http://www.accessmonster.com

0
ar013871
3/14/2007 2:39:26 PM
I guess my first question in regards to splitting a database, is does this
work if you have a SQL BE?

ar013871 wrote:
>Would splitting the database help?  I've never done this before, is the
>process easy?
>
>>It wouldn't surprise me if it is taking users a long time to fill out the
>>form.  Not because the form is too long or complicated, it is because they
>[quoted text clipped - 27 lines]
>>>time, or only occasionally?  Do they really seem to correspond to 
>>>situations where users are updating the same records?

-- 
Message posted via http://www.accessmonster.com

0
ar013871
3/14/2007 3:04:27 PM
In news:6f2c0c5873464@uwe,
ar013871 via AccessMonster.com <u23484@uwe> wrote:
> Would splitting the database help?  I've never done this before, is
> the process easy?

If you have a SQL Server back-end, you're already split.  Now, if every 
user is logging into the same Access front-end, which resides on a 
network share, you aren't taking full advantage of the 
front-end/back-end arrangement.  Is that what you're doing?  Normally, 
each user would have her own copy of the front-end, installed on her 
local PC.

It's possible, of course, that you aren't *fully* split.  Does the 
Access front-end contain local tables with shared data?  It's not 
unusual to have user-specific information in the front-end, since each 
user would have a separate copy of the front-end.  But if there's 
non-user-specific data in the front-end, you would need to migrate that 
to the back-end before giving each user her own copy of the front-end.

It occurs to me that, if you have all your users using the same copy of 
the front-end, that may have something to do with the write-conflict 
problem you're experiencing.  But it's just conjecture at this point.

-- 
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


0
Dirk
3/14/2007 6:00:01 PM
In news:6f2636d24b1bf@uwe,
ar013871 via AccessMonster.com <u23484@uwe> wrote:
>
> We've received the error when opening up a form (i've incorporated a
> search feature that returns results in a list box - user can double
> click on the record or select the open form button to open it up) and
> we've seen the error when a user was trying to enter data.  I'm
> stumped!

Is it that you are opening popup forms to enter detail information while 
editing the basic information on the main form?  That could cause the 
problem, as you'd be in conflict with yourself.

> I've even seen forums where they say this is a known bug for Access
> and to deal with it

I don't know of any such "known bug" except with regard to needing 
timestamp fields, not trying to save Null bit fields, etc.  Those are 
known issues, with specific cures.

> outlets before concluding that.  Would the wireless connection play a
> part?  Would it help to be wired?

I don't think so.  It could be that your application design is causing 
the problem, but it's hard to say without pinning down one or more 
reproducible scenarios for triggering the conflict.

-- 
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


0
Dirk
3/14/2007 6:04:55 PM
Reply:

Similar Artilces:

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 ...

Set table cell size so that I can put a border around a table
Hi there, I'm trying to put a border around my table - which is a board game for kids to play with (so that when you change fonts etc it will grow, whereas a shape or text box wouldn't) So for instance I want a 5x5 table, so I make the actual table 7 x 7, then merge the outside rows and columns together so that this then forms my outside border. What I want to know is how can I set the cell size on this 'border' so that the top/bottom and left/right cells are the same size ( I guess you are after the height of the top/bottom cell to be the same size as the width of the...

Where to put authentication info for smart host in Exchange 5.5?
I need to switch the smarthost in IMC, but the new smarthost requires authentication. Anyone can let me know where to put the authentication info? Thanks. On Sat, 18 Nov 2006 16:01:02 -0800, William Lo <WilliamLo@discussions.microsoft.com> wrote: >I need to switch the smarthost in IMC, but the new smarthost requires >authentication. Anyone can let me know where to put the authentication info? >Thanks. Is there a security tab in the IMS properties? I got it Andy, thanks. I was adding another email domain in the security tab, so it didn't work. I now changed the d...

Logical proof of SQL change
See DDL below. This represents a very simplistic view of my client's system, in which there are actually about 95 tables and nearly 50 views. The views are used primarily to provide a real-time snapshot of certain datasets for auditing purposes. The database has medical applications so it has to be carefully controlled. Most of the views include in their JOIN a "nested view" - that is, a view that contains common columns that are needed for all deriving views (data items such as Patient Ref, Treatment Date etc.) I've modelled this with the view CommonView belo...

How to put a parameter into an Excel Query
I am creating an external data query in excel to reterive data from a SQL database, one of the fields in the db is a date. When I run the query I want Excel to asked me for a date range for the data to return. Can any one tell me what I have to enter into the MS Query Editor in the query criteria area to bring up a window that asks for the start and end date of the data that it will reterive? Thanks in advance for any assistance This website will explain what you need to know: http://www.rdg.ac.uk/ITS/info/training/notes/excel/query/ Does that help? *********** Regards, Ron XL2002...

Put Active Worksheet's Name in a Cell
Is there anyway to put the currently active worksheet's name in a cell? Not the filename of the whole workbook, just the currently selected worksheet. Thanks for your help. While a little complicated...this should do it =RIGHT(CELL("filename"),LEN(CELL("filename"))-SEARCH("]",CELL("filename"))) See http://www.xldynamic.com/source/xld.xlFAQ0002.html -- HTH RP (remove nothere from the email address if mailing direct) <coreymartin@gmail.com> wrote in message news:1136573977.306950.249540@z14g2000cwz.googlegroups.com... > Is there a...

Can a Timeline be put to scale (15,000 yr datapoint spread)?
I am trying to visually represent events on a timeline and would like the timeline to be to scale (from 13,000 B.C. to 2005). How do I set the start, end and data points? Thanks, eagle.al It sounds like you need to enter all of your events into a table and convert it to a lineal chart. I'm not sure how to do that exactly but if you play around with it, you might figure it out. "eagle.al" wrote: > I am trying to visually represent events on a timeline and would like the > timeline to be to scale (from 13,000 B.C. to 2005). How do I set the start, > end and da...

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 ...

Is there a size limit for putting a excel webpage online?
I took a large spreadsheet with an autofilter in place and created a webpage from it, but have never been able to get it to work after putting it online. Where can I help on this subject? I sent it to someone else who sd he would try something and he sd it was too big for frontpage. I put all my CDs in software to get info on them then exported to a txt file, then put that in excel and tweeked it and put in the filter. It's around 3450 rows long (to give some reference) Thanks, Pull ...

Put some limitation in FileOpen dialog
Hi all, In File Open dialog, I like to do following things.. any advice appreciated - always show certain directory - allow file open just in certain directory and its subdirectory Regards Bob NZ Bobby wrote: > Hi all, > > In File Open dialog, I like to do following things.. any advice appreciated > > - always show certain directory > - allow file open just in certain directory and its subdirectory > > Regards > Bob > NZ > > You can derive a class from CFileDialog and customize the constructor. For example, pass the desired initial directory to ...

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 ...

Performance Problem and the Logical Disk Manager service
I am experiencing a number of related (I believe) issues with one of my old PCs. I have just reinstalled Windows XP. The machine has two S-ATA drives, one old, the other brand new - and now hosting seven partitions including the C Drive. The rebuild was going well (the machine is currently at XP SP2 ) until I deleted a partition on the older drive – I did this from the Disk Management console. Immediately thereafter I encountered problems: all of the NTFS partitions on that disk appeared to have been deleted, and when I re-booted the machine the disk was no longer visible in the ...

Dirty Bits?
When I rebooted my computer (WinXP SP3) I got a bizarre message saying that "The volume is dirty," apparently in reference to my external hard drive. What the $%^& does this mean? And more particularly, must I do something about whatever is "dirty" about that drive? When I did a google search I found a reference to "setting the dirty bit," terminology which, I must admit, seems to have more to do with connubial delights than with my computer. of course, I also found ads hawking software which assuredly (yeah, sure) would fix this and any other...

extended stored procedures causing logical page errors?
Where do I get the latest SDKs for building extended stored procedures? I know they are frowned upon these days, but in this case I have no choice. Thanks. What version of SQL Server are you using? If it is 2005 or 2008 you should look at using CLR functions or stored procedures and all you need is dotnet. -- Andrew J. Kelly SQL MVP Solid Quality Mentors "Neil W" <neilw@netlib.com> wrote in message news:OWpTPZcfKHA.3916@TK2MSFTNGP05.phx.gbl... > Where do I get the latest SDKs for building extended stored procedures? I > know they are fro...

how to put certain items together
...

Can a checkbox be created with a logic function?
I currently have a SS that utilizes a column of checkboxes. I also have a macro that filters for checkboxes that are TRUE, thus hiding the rows with unchecked boxes. The two things I don't like with this configuration are that the checkboxes are too small, and when I filter, many of the unchecked checkboxes superimpose themselves on what becomes visible on the SS. So my question is: can a logic function be written so that if an open cell is selected, it is automatically populated with a text checkmark? And secondly, if a cell with that checkmark is selected again, the checkm...

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...

How do I put things in alphabetical order in microsoft word?
I put a list of names in microsoft word and now I want to put them in alphabetical order is there somewhere in the word that would do this for me in one click or so? On Sat, 15 May 2010 16:19:01 -0700, Bird <Bird@discussions.microsoft.com> wrote: >I put a list of names in microsoft word and now I want to put them in >alphabetical order is there somewhere in the word that would do this for me >in one click or so? If you have Word 2003 or earlier, select the names and click Table > Sort. If you have Word 2007, select the names and click the Sort button in ...

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.d...

XL2K
I do this all the time in the header or footer wherever needed by using the "&[Tab]" feature available; however, is there some coding that we can put into a cell that will do the same anywhere on the body of the sheet itself? I couldn't find the exact planner sheets I needed at stores for my new planner so I ended up creating my own pages last night. I'd like to add the tab name somewhere on the bottom of individual page of which 3 fit on each worksheet. This way, if I ever change the tab names or copy them for use as templates for other forms, I won't have to worr...

How do I put different subheading on each page for my headers?
How do I put different subheading on each page for my headers? You can use the StyleRef field if the heading appears on the page. If not, you'll need to add section breaks, but note that if you're thinking of having the heading only in the header, this is not a good idea, especially if you need a TOC since the TOC can't pick up headings anywhere but in the document body. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Terry" <Terry@discussions.microsoft.com> wrote in message news:984AAA0...

How to put Tags while saving?
I read that with 2k7 version, while saving, you can embed tags so that in Vista, while searching, you can search for tags. But I am not able to locate that option. Please help! Thanks In Vista (and Windows 7) the document property that used to be known as "keywords" is now displayed as "tags". When you right-click a document in Windows Explorer (lately renamed "My Computer" or just "Computer") and go to the Details tab, you can see and edit a Tags field. In the properties dialog displayed inside Office programs, though, that field is stil...

Form Dirty not firing
I have a form that I enter and with the Load event I disable the Save button. I want the button to appear as soon as the form is dirty. I have done this before with no problems even with other forms in this same application. When I type in the first field, the Form Dirty event is not firing. I have a msgbox statement in the Form_Dirty event and it never appears. I have an AfterUpdate event on the first field and I test Me.Dirty in that code. Me.Dirty is true in that test of the first field. Why doesn't Form.Dirty fire? What do I need to look at that will help me trace this issue? How can...

Put control above all other
Hi, Iam trying to make one window appear always above other in my dialog. I need it to my custom combobox. I know I can do it the way standard comboboxes are done, but maybe this is not the only possible approach. Currently Iam making my listbox (drop down list) to be child of desktop window. Iam a bit confused by how z-order of controls works, I thought that if I use BringWindowToTop() then this window should be rendered above all others, but actually this does not happen. Any hints would be very welcome. thanks. Hey Martin, The method I would use to use overlapping is as follows....

Locate Physical Drive Signature and it associated Logical Drive Na
Hi I can determine physical disk signatures by : gwmi Win32_DiskDrive | Foreach-Object { $_.Signature } I can determine logical drives by : gwmi Win32_LogicalDisk | Foreach-Object { $_.DeviceID } But I'm not able to get my head around WMI ASSOCIATIVE CLASSES. How do I associate these classes so that for each PHYSICAL drive I can easily list it's signature and logical drive names? I have this vbscript but cannot convert it :( (I need alot more powershell practise) wscript.echo "Disk Drive Signatures" wscript.echo "====================="...