M.***********@uva.nl (Marc) wrote in message news:<ae**************************@posting.google. com>...
cl*****@memrb.com.cy (CLarkou) wrote in message news:<db**************************@posting.google. com>... On a client's machine with Office 97, my access program gives an error
"The Expression you entered refers to an object that is closed or
doesn't exist" when I am assigning a value in the checkbox.
chk_multiuser.Value = 0
What could be the cause of this error ?
probably you referred to a form-field name in a module that is not a
classmodule of the form (event-procedure). Outside the form-context
the field-object is not available or (if available) could only be
addressed using an explicit reference to what form in the database
(DAO) or indirectly by passing through byref-parameters or
function-results.
Marc
OOOOOkay....
is the form open? IF not, you can't reference anything on it. The
object that's closed is the form, so the controls on it and the
functions/procedures that are behind the form are not in memory/not
available. Real simple. check to see if the form is open before
running your code. If it isn't, open the form. Then run your stuff.
then return the form to it's original state (open/closed). done deal.