Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002
    Posts
    3

    Unanswered: Manage the counter

    Is there someone who knows an algorithm in VBA to permit the management of a counter for making a reservation , includes cancels,etc...(or other suggestions). I've a multi-user application developed with Access 2000 and VBA, but I've some problem with sharing access to this counter.
    Thanks a lot
    Ivan A.

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    Could you explain the use of this counter in greater detail ?

  3. #3
    Join Date
    Jun 2002
    Posts
    3
    I've created a sharing db where users can fill in a form, the counter should be number the forms compiled in a progressive order and follow it, if possible, with no gap. In the table that I've created, I didn't use Autonumber data type, but simply a numeric one.
    Because the form is saved only at the end of the compilation, it could happens that someone else in the same time open a new form with my number before I've saved, but any form must have a distinct number. At the moment, I open the table and check the last number saved and I increment it (i+1). May be, the form should saved immediately when the number is assigned, so I'd be sure having the number (like a reservation), but it's possible that a user can reverse and abandon the input,canceling the form, leaving a gap between two numbers.
    In the last case I thougth that could be possible to search in the table not assigned numbers, comparing the n and n+1 rows, so if n <> n+1, assign the free number to the new form (like a reservation).
    Ivan A.
    PS: the problem could be easy to solve, but I have no much experience, as the number of my posts shows... ^_^

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •