Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing Controlprop from code

Status
Not open for further replies.

Kalin

Programmer
Jul 24, 2001
76
NL
Hi all,

I have the following problem.

How do I access the properties of a control on a specific record ?

If I set the properties on a control from code it sets the properties for this control on all records, what I want is to set it just on one record.

The application is in Access 97. Grtz,

Kalin
 
Kalin,

You will need to reset the controls on the Form_Current event.

Thus every time the properties are changed, when you move records, they are changed back.

Craig
 
Well,

I forgot to say, the form is a continuous form.
So multiple records are visible at any given time.

For those records the properties can (don't have to) be different.

At the Load form event the properties are set...... Grtz,

Kalin
 
I'd like to clear up a matter. Most properties of a control on a form are not tied to the data being displayed. On a contiuous form, it is like getting a copy of the form, over and over. When you set the properties, note there is only syntax to support changing a property for the control, and not for any of the 'virtual' copies you get. The copies effectively inherit the properties of the real control.

However, what I think you may be looking for is Conditional Formatting. Select a control, click "Format/Conditional Formatting..." This allows you to change the appearance of the control depending on what is being displayed. I think in continuous forms, it operates on each 'virtual' copy of the control. It is the only property that I know of that works like this. All others will apply to the real control and all the 'virtaul' copies. I haven't personally used this feature, but I've seen running examples of it during presentations of this feature.

Now, for you here is the rub. Conditional formatting is not a feature in 97. Time to upgrade. You can't get there from here in 97. Peleg
PelegNOSPAM@PStrauss.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top