R
rdemyan via AccessMonster.com
I have an unbound form with an unbound listbox. The form is being used to
update a table. Since it is unbound, I have to code for "write-after-write"
conflicts. I define this as:
1) User 1 selects a record from the listbox to edit. My code puts the
updatable fields into textboxes when the user doubleclicks on the listbox row.
The values in the textboxes can then be edited and saved to the table.
2) User 2 is viewing the same record on the form.
3) User 1 makes a change and saves it.
4) The data on User 2's machine should not have updated and if User 2 double-
clicks on the same record in the listbox to edit it, he/she should not see
the change.
This is the way things work when textboxes are used and not listboxes. As an
aside, I use the method recommended by Mary Chipman, et.al. in their SQL
Server book to update tables using unbound forms. This involves checking the
Concurrency ID which is added to the table.
Here's the issue. I'm noticing that when User 1 changes the listbox record,
that when User 2 just clicks on the listbox (say to scroll through it), the
record on User 2's machine (that was just updated by User 1) is in fact
updated on User 2's machine????
But this is an unbound form, so how can that be. I have noticed that when
the RowSource of a combobox or listbox is set in code, the RowSource listed
in "Properties" does retain whatever was specified in VBA code.
So does this then effectively turn the listbox/combobox into bound controls?
Also, is there anyway that I can code to trap this change made by User #1,
which somehow magically shows up on User#2's machine, even though the form is
UNBOUND, so that I can inform User#2 that a change has been made.
Thanks.
update a table. Since it is unbound, I have to code for "write-after-write"
conflicts. I define this as:
1) User 1 selects a record from the listbox to edit. My code puts the
updatable fields into textboxes when the user doubleclicks on the listbox row.
The values in the textboxes can then be edited and saved to the table.
2) User 2 is viewing the same record on the form.
3) User 1 makes a change and saves it.
4) The data on User 2's machine should not have updated and if User 2 double-
clicks on the same record in the listbox to edit it, he/she should not see
the change.
This is the way things work when textboxes are used and not listboxes. As an
aside, I use the method recommended by Mary Chipman, et.al. in their SQL
Server book to update tables using unbound forms. This involves checking the
Concurrency ID which is added to the table.
Here's the issue. I'm noticing that when User 1 changes the listbox record,
that when User 2 just clicks on the listbox (say to scroll through it), the
record on User 2's machine (that was just updated by User 1) is in fact
updated on User 2's machine????
But this is an unbound form, so how can that be. I have noticed that when
the RowSource of a combobox or listbox is set in code, the RowSource listed
in "Properties" does retain whatever was specified in VBA code.
So does this then effectively turn the listbox/combobox into bound controls?
Also, is there anyway that I can code to trap this change made by User #1,
which somehow magically shows up on User#2's machine, even though the form is
UNBOUND, so that I can inform User#2 that a change has been made.
Thanks.