How To Find Out If A Variable Is Assigned?

  • Thread starter Thread starter Sandra Daigle
  • Start date Start date
what you are trying to do is a waste of time...code executes on each users
PC...whether the database is shared or not...so, the variable will always be
unassigned unless the user opened the recordset. Each user has their own
code space.

If this is really needed...you need to save to a table.
 
<G>

Sandra Daigle said:
Oh brother, you are so correct - I was too busy looking at the subject
question and missed that part!

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

Paul said:
what you are trying to do is a waste of time...code executes on each users
PC...whether the database is shared or not...so, the variable will always
be unassigned unless the user opened the recordset. Each user has their
own code space.

If this is really needed...you need to save to a table.
 
I use Access 97 on Windows NT4. I have to be able to find out if a global
recordset variable is currently assigned or not: if not, the current user
can utiltise it, but if it is already being used by another user I need to
be able to give an error message and tell the user to wait until the
recordset becomes available. (The first user will set it to Nothing when
they have finished with it.) I have tried

if grst = nothing
if grst = 0
if grst = null
if grst = empty

but get various error messages about type mismatches. Can anyone tell me
how I can test to see if this variable is currently assigned and has a non-
zero value? Thanks a lot in advance to anyone who can help.
 
Back
Top