I'm building a multi-user database with custom counter. (I have referenced KB article Q140908) Unlike their example, however, I cannot store the next number, since it uses the month (i.e., if the last number issued is 1998-12-101, the next number issued would be 1998-12-102 if issued this month or 1999-01-01 if issued next month.)
My problem comes when trying to find the last number issued. As suggested in the KB article, I use a separate table to store the last number instead next number.
With two computers on my desk, I've tried testing ways to allow one instance of the database to have exclusive access to this table while trying to get the other to one wait until the first one was done, but to no avail. (Using "On Error" to trap the 3260 error and looping until it went away. The only thing I've managed to do was to lock out neither or both intances at once!)
This is my first foray into multi user databases, basically working with bound forms up until now. Accessing tables with code instead of bound forms is my weak area, so I don't know if there is some sort of "exclusive" switch or option I'm missing on the
Set MyTable = MyDB.OpenRecordset("Counter Table")
statement, which Microsoft assumes you'll use or what.
Any leads (or answers) would be greatly apprectiated.