Phantom code--anyone else experienced this?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Form: single record, single form (no subforms)
Data resides in sql on sbs2003
Form source is a query running against one table

Based on data value in one field, certain fields set to visible = true or
false.
This works perfectly fine.

In testing for some other issues, I commented out that code everywhere it
appears behind that form. Results: some objects are visible when the form
opens and some are not.

Where is this phantom code residing?

thanks...Elaine
 
Elaine said:
Form: single record, single form (no subforms)
Data resides in sql on sbs2003
Form source is a query running against one table

Based on data value in one field, certain fields set to visible =
true or false.
This works perfectly fine.

In testing for some other issues, I commented out that code
everywhere it appears behind that form. Results: some objects are
visible when the form opens and some are not.

Where is this phantom code residing?

Have you verified that the form didn't get saved with those controls'
Visible properties set that way? I've known that to happen, while
developing a form and flipping it into and out of design view.
 
Dirk,
Thanks for the reply but I am not sure what you mean by that.

My understanding is that an object being visible or not must be set in code
(it is not a setting on the object's properties.). If that is true, then how
or where is Access storing this info and why? Actually my concern is really
what else it is storing that could/does impact other form behavior!

Elaine
 
Hi Elaine,

Dirk is perfectly correct, you can look at and set object properties in
the design view of a form. If you right click the control that you are
interested in and go right down to the bottom of the menu that appears
select properties. Visible is one of those properties.

Good luck

Nick
 
Elaine said:
Dirk,
Thanks for the reply but I am not sure what you mean by that.

My understanding is that an object being visible or not must be set
in code (it is not a setting on the object's properties.). If that
is true, then how or where is Access storing this info and why?
Actually my concern is really what else it is storing that could/does
impact other form behavior!

By objects, you're talking about controls -- text boxes, combo boxes,
list boxes, labels, etc. -- on forms, right? Each control has a Visible
property, which is presented on the Format tab of the control's property
sheet in design view. So you can design a control to be invisible,
until or unless you use code to set its Visible property to True.

There are lots of properties that you can set at design time via the
property sheet, that affect an object's behavior. Have a look at all
the properties listed on the various tabs of the property sheet. The
properties do vary depending on the type of object, as some properties
apply to all controls and some apply only to controls of a certain type.
 
Guess I need more coffee....sorry....yes of course, I see what you are saying
and of course I know there is a property for visible becuase I set it! YIKES!

And, furthermore, I see what you are saying about that property reflected
the last code run.

Thanks to you and Nick. Hopefully my brain is now reset too! :)
 

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