View Single Post
  #2  
Old April 11th, 2009, 04:18 PM posted to microsoft.public.access.forms
Albert D. Kallal
external usenet poster
 
Posts: 2,874
Default Check/Uncheck All, write conflict

"2vao" wrote in message
...
Hello,

I have a form +subform, on the subform (countinuous form) I have a check
box. on the main form I have an unbound check box that I want to
check/uncheck all the check boxes of my records on my subform. I have an
update query to perform that task.


You have to bind that text box or check box to something. So, two choices:

Add a check box column to the table, and then bind that checkbox to that
column.

Or, you can use my multi-select example he

http://www.members.shaw.ca/AlbertKal.../msaccess.html

The above example shows you how to select multiple items from a continues
form, and then use those selections for whatever.

The nice feature of this example is that it does not use a actual field in
the database to accomplish this.


-Problem 2: I get a write conflict message " Save records or Copy to
clipboard or Drop change "


If you run some update on a records that are "dirty", then you get that
conflict (the other user changing things is in fact your code). Just ensure
you force a disk write before you run any update(s) on potentially the same
record that may already be dirty.

the code to force a disk write is:

if me.dirty = true then me.Dirty = false

......your update code goes here......

So, just make sure you force a disk write of the record as above......


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada