Re: Generating Unique Numbers on a Form with Multi-users



"Keith Wilby" <here@xxxxxxxxx> wrote in message
news:45864dc6$1_1@xxxxxxxxxxxxxxxxxxxxxxxxx
"Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx> wrote in message
news:O$dZngFIHHA.4896@xxxxxxxxxxxxxxxxxxxxxxx
Not sure that's appropriate in a multi-user environment, Keith. While the
odds are very low, it's possible two users may grab the same value that way.

Works fine for me Doug, but I always do a refresh immediately and don't allow
deletions (provide a "deleted record" flag instead).

What does refreshing have to do with it? If a user navigates to the new record
position he can let the form sit like that indefinitely before he actually
enters and saves a record. During that interval numerous other users will have
already used the default number on his form as well as many higher ones. He is
virtually guaranteed to get an error unless your idea of "multi-user" is very
conservative.

Not to mention that assigning this value with the DefaultValue property doesn't
work at all on a continuous form (even in a single user app).

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


.



Relevant Pages

  • RE: Multi-user table access problem
    ... I have set a flag on an "editstatus" field I put into ... I have a table that users can grab records from. ... This locking mechanism enforces single-threading but I'm ...
    (microsoft.public.access.formscoding)
  • Re: Key concepts?
    ... >Randori is an integral aspect of our training. ... >We do use, in partner practice, submission holds and chokes - and we ... One way I think you might do it is by running some 'defend the flag' ... resisting when they grab you - or you grab them. ...
    (rec.martial-arts)
  • RE: Multi-user table access problem
    ... I have set a flag on an "editstatus" field I put into ... I have a table that users can grab records from. ... complex locking mechanism that involves inserting and deleting rows from a ... This locking mechanism enforces single-threading but I'm ...
    (microsoft.public.access.formscoding)
  • Re: farming honor in BGs
    ... and the opposing team decides to focus 100% on defense so they ... the flag out of their base and you have a clear run home. ... grab and sprint. ... 100% of team defending doesn't mean 0% chance of getting to the ...
    (alt.games.warcraft)
  • Re: Zero Emission Computing
    ... What will they think of next in the rush to grab ... the greenwash market? ... remove him from my killfile.) ... How would you know whether Doug has worked it out, ...
    (uk.transport)