Form visible problem

  • Thread starter Thread starter RBDU
  • Start date Start date
R

RBDU

Hi All! thanking anyone for a reply. A97.

I have a form with a subform set to visible = No. It becomes visible on user
interaction then becomes invisible again once it is no longer needed.

On exiting the database, this database closes.

Now the problem is that access then refuses to close and minimises down on
the task bar. Its an empty access page and when I try to close it, it does
not.

Is this problem caused by the forms visibility situation. Any solutions?

Regards Peter
 
This is a known problem in Access. It's nothing to do with any forms
being visible or invisible.

Look for lines like this, anywhere in your code:

if me![blah] then ...
if me!blah then ...
if me.blah then ...
if forms("...")![blah] then
if forms("..."!blah then
if forms("...").blah then ...

where 'blah' is the name of any control in a form.

Let me denote those lines, as: If XXX then ...
XXX is any of six alternatives, shown above.

To fix the problem, change those lines to:
If XXX = TRUE then ...
^^^^^^^^^^
or:
If XXX.VALUE then ...
^^^^^^^^^^^

HTH,
TC (MVP Access)
http://tc2.atspace.com
 
I've encountered this problem and determined it to be a problem with access
object references.

In my situation I was using a select statement to determine the active
control as shown in the following:

select case me.activecontrol.name

case me.MyCtrl1.Name
case me.MyCtrl2.Name

end select

The resolution was to use a string name rather than call on the access
control object.

select me.activecontrol.name

case "MyCtrl1"
case "MyCtrl2"

end select
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top