Hi all,
I have what I think is a very complicated problem.
I have a query, that pulls a set of values from a table. The query assigns a random number to all of those values, and each time it is refreshed the random number changes but not the value. The query only returns 2 results.
So if you can imagine, loading up the query it will return 2 values, if you close it and reopen it, it returns two different values.
That's all well and good in a single user environment. Though, I am currently in a multiuser environment.
These queries are are form based, if User A accesses Record 1, and starts editing it, and if User B somehow tried to access Record 1 (unlikely due to the random number thing) User B can't due to the form being locked.
I've tested it and you physically cannot type anything on User B's Form.
The Forms Record Locking property is set to Edited Record.
Is there anyway, that VBA can pick up the fact that, that specific record is locked?
What I am essentially trying to achive is:
User A loads up form, gets a random value.
User B loads up form, but gets same random value.
User A starts editing record.
User B tries to edit same record but can't due to record locking.
At the last point, I would like a message to pop up to User B, saying this record is locked, and thus cannot be editied. The VBA code will return them to the main menu, so that User B can reload the form, and get new random values.
Hope this make sense. Probably not.
Thanks
I have what I think is a very complicated problem.
I have a query, that pulls a set of values from a table. The query assigns a random number to all of those values, and each time it is refreshed the random number changes but not the value. The query only returns 2 results.
So if you can imagine, loading up the query it will return 2 values, if you close it and reopen it, it returns two different values.
That's all well and good in a single user environment. Though, I am currently in a multiuser environment.
These queries are are form based, if User A accesses Record 1, and starts editing it, and if User B somehow tried to access Record 1 (unlikely due to the random number thing) User B can't due to the form being locked.
I've tested it and you physically cannot type anything on User B's Form.
The Forms Record Locking property is set to Edited Record.
Is there anyway, that VBA can pick up the fact that, that specific record is locked?
What I am essentially trying to achive is:
User A loads up form, gets a random value.
User B loads up form, but gets same random value.
User A starts editing record.
User B tries to edit same record but can't due to record locking.
At the last point, I would like a message to pop up to User B, saying this record is locked, and thus cannot be editied. The VBA code will return them to the main menu, so that User B can reload the form, and get new random values.
Hope this make sense. Probably not.
Thanks