By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,147 Members | 744 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,147 IT Pros & Developers. It's quick & easy.

Mutli-user Update using Recordset.AddNew and mutliselection ListBoxes - 3 questions

P: n/a
Hello,

I have a quick question (I hope). I have a form with a combo box and
a multi-selection list box. The list box is based on a query. Users
can select values from the cmbobox to add to the list box (items they
wish inserted into the table), or they can select items in the list
box to delete (from the table). Once they have finished making any
changes, they are to click a SAVE button to actually commit the
changes to the database. This "delayed save" piece is causing me some
headache.

The problem is that having the listbox's source be Query means that a
user cannot see the changes (s)he is making appear in the list box as
I want. The changes don't show up until save is hit. Although I can
think of a way to perhaps solved this problem, I would prefer to use
one of the two methods below if possible (depending on the answers to
the quesions within them. Your help on these questions would be
GREATly appreciated!

Scenario One (Preferred): Make the updates immediately, but use a
transaction. The problem with this is that I cannot figure out how to
make the changes show up BEFORE I commit them. QUESTION 1: Does
anyone know how to make the data within a transaction the source of a
listbox?

Scenario Two: Make the list box's row source a value list. I would
then populate this list of values by running the query used as the
rowsource in Scenario One and making a string out of it during the
oncurrent event. I could then set this string to be the rowsource of
the list box, and in this way I can easily add or subtract values from
the list. After the user is done adding or subtracting items, (s)he
would hit save, and I could clear all previous items and commit the
whole new list to the table using an AppendOnly Recordset and the
ADDNew method. The potential problem is that if another user is
editing the same records the two users could potentially overwright
each others changes. (If the 2nd user opens the form before the first
has finished commiting his/her changes). QUESTION 2: Given that the
form is based on two tables with a one to many relationship and only
shows one record because of a criteria in the form source query, if I
say "LOCK CURRENT RECORD" in the form options, will this prevent
another user from opening a copy of the form showing the same record?

Thanks,
Ryan Rembaum
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a


"Ryan" <ry************@kp.org> wrote in message
news:b5**************************@posting.google.c om
Hello,

I have a quick question (I hope). I have a form with a combo box and
a multi-selection list box. The list box is based on a query. Users
can select values from the cmbobox to add to the list box (items they
wish inserted into the table), or they can select items in the list
box to delete (from the table). Once they have finished making any
changes, they are to click a SAVE button to actually commit the
changes to the database. This "delayed save" piece is causing me some
headache.

The problem is that having the listbox's source be Query means that a
user cannot see the changes (s)he is making appear in the list box as
I want. The changes don't show up until save is hit. Although I can
think of a way to perhaps solved this problem, I would prefer to use
one of the two methods below if possible (depending on the answers to
the quesions within them. Your help on these questions would be
GREATly appreciated!

Scenario One (Preferred): Make the updates immediately, but use a
transaction. The problem with this is that I cannot figure out how to
make the changes show up BEFORE I commit them. QUESTION 1: Does
anyone know how to make the data within a transaction the source of a
listbox?

Scenario Two: Make the list box's row source a value list. I would
then populate this list of values by running the query used as the
rowsource in Scenario One and making a string out of it during the
oncurrent event. I could then set this string to be the rowsource of
the list box, and in this way I can easily add or subtract values from
the list. After the user is done adding or subtracting items, (s)he
would hit save, and I could clear all previous items and commit the
whole new list to the table using an AppendOnly Recordset and the
ADDNew method. The potential problem is that if another user is
editing the same records the two users could potentially overwright
each others changes. (If the 2nd user opens the form before the first
has finished commiting his/her changes). QUESTION 2: Given that the
form is based on two tables with a one to many relationship and only
shows one record because of a criteria in the form source query, if I
say "LOCK CURRENT RECORD" in the form options, will this prevent
another user from opening a copy of the form showing the same record?

Thanks,
Ryan Rembaum


Or use a temporary table ?
--
regards,

Bradley
Or u
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.