A
Andrew Shriner
There was a thread about this a few days ago... this is just a little more
complex than that, though - this takes it to the next step (multiuser
concurrently).
I created a database over a year ago that I haven't touched since... until
now. Suddenly, multiple users need to be able to add new records
concurrently (in a couple of forms I have created).
When I created the forms, I used the DMAX domain aggregate function in the
way that Larry Linson suggested in a post in an earlier thread - quoted
below (it retrieves the current DMAX & increments it, and uses that as the
new number to use). The problem is, if one person has opened the form, it
fetches the current DMAX & increments it, but it does not save the record
until that user has completed the form in the way I've decided. Thus, if
another user opens the same form, the exact same DMAX number is returned and
incremented, and then the two users may overwrite each other's data... or
worse.
Do you have any suggestions on how I should fix the problem? Would it be
best just to have the record automatically saved after the DMAX number is
incremented, before the fields in that record are populated? Is there
another solution, or is there a reason this idea should not be used, or will
not work?
Thanks for your help!
Andrew Shriner
complex than that, though - this takes it to the next step (multiuser
concurrently).
I created a database over a year ago that I haven't touched since... until
now. Suddenly, multiple users need to be able to add new records
concurrently (in a couple of forms I have created).
When I created the forms, I used the DMAX domain aggregate function in the
way that Larry Linson suggested in a post in an earlier thread - quoted
below (it retrieves the current DMAX & increments it, and uses that as the
new number to use). The problem is, if one person has opened the form, it
fetches the current DMAX & increments it, but it does not save the record
until that user has completed the form in the way I've decided. Thus, if
another user opens the same form, the exact same DMAX number is returned and
incremented, and then the two users may overwrite each other's data... or
worse.
Do you have any suggestions on how I should fix the problem? Would it be
best just to have the record automatically saved after the DMAX number is
incremented, before the fields in that record are populated? Is there
another solution, or is there a reason this idea should not be used, or will
not work?
Thanks for your help!
Andrew Shriner