More Visible questions

  • Thread starter Thread starter Robin
  • Start date Start date
R

Robin

I have a continuous form and for each record, based on the value in field A,
I want field B be visible or not.

I tried the condition on the 'on open' property, and it just sets the
visible property of field B on all the records, based on the value of field
A in the last record.

The same with the 'on current' property. It changes the visibility of field
B in all the records based on the value of field A in the current record.

How do I make it happen individually for each record on the continuous form?

thanks!
 
Hi Robin,

On a continuous form any modification to the properties of a control will be
apparent on all rows of a continuous subform since there is just one
control - just multiple copies of the control are displayed. To change
formatting on a row-by-row basis you need to use conditional formatting
(Access 2000-2002). This feature allows you to specify upto 3 conditions and
formatting options for when the each of the conditions is met.
Unfortunately, conditional formatting does not provide a way to hide/unhide
controls. As a work around, you could still use it to change the foreground
color to match the background color of the control in question.

To use, select the control, click Format, Conditional Formatting. Check the
help for more details.
 
well crap. no wonder i spent all morning beating my head against the wall.
Thanks for your reply. It just means I have a messier form.



Sandra Daigle said:
Hi Robin,

On a continuous form any modification to the properties of a control will be
apparent on all rows of a continuous subform since there is just one
control - just multiple copies of the control are displayed. To change
formatting on a row-by-row basis you need to use conditional formatting
(Access 2000-2002). This feature allows you to specify upto 3 conditions and
formatting options for when the each of the conditions is met.
Unfortunately, conditional formatting does not provide a way to hide/unhide
controls. As a work around, you could still use it to change the foreground
color to match the background color of the control in question.

To use, select the control, click Format, Conditional Formatting. Check the
help for more details.

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

I have a continuous form and for each record, based on the value in
field A, I want field B be visible or not.

I tried the condition on the 'on open' property, and it just sets the
visible property of field B on all the records, based on the value of
field A in the last record.

The same with the 'on current' property. It changes the visibility
of field B in all the records based on the value of field A in the
current record.

How do I make it happen individually for each record on the
continuous form?

thanks!
 
Sandra Daigle said:
Hi Robin,

On a continuous form any modification to the properties of a control will be
apparent on all rows of a continuous subform since there is just one
control - just multiple copies of the control are displayed. To change
formatting on a row-by-row basis you need to use conditional formatting
(Access 2000-2002)...


Is there any way of filtering the data in a second control? My
situation:
Main form has details of a project. The subform is a continuous form
for adding team members to the project. Each team member has a Name
and a Department (eg IT, Finance, Personnel). There are two dropdown
controls on the subform. the first selects the Department; the second,
the Name.

I want to select a Department in the first dropdown, and have the
second dropdown filtered to only show people in that Department.

Normally I could do this with an unbound dropdown for the Department,
and just store the Name against the Project ID. BUT... it is possible
for a person to be in several Departments, so I need to store the
Department as well.

I've tried adding code to the first dropdown's AfterUpdate, or
OnChange, and it works fine when you enter new records, but your
buggered if you go back to an old one.

Is there a data/filter equivalent of conditional formatting, that will
help me here?
 
Hi Tim,

Yes - but it requires a little trick - to create the effect of a
synchronized combo in a continuous form create another textbox control,
include the display column of the combo in the Recordsource query of the
form (join the foreign table and drag in the column). Position and size the
new textbox so that you can place it directly over the combo box allowing
only the down-arrow portion of the combo to show.

Create a GotFocus event for the textbox that only does a SetFocus to the
combo.

This will create the effect that you are wanting - the correct display value
will always show even though the value itself might not be fit the criteria
that is in effect based on the current record.

Here's a KB Article that explains the problem

ACC2000: Combo Box in Continuous Form Shows Incorrect Data
http://support.microsoft.com/default.aspx?scid=kb;en-us;208866

Here's a link to my sample database that offers several different
alternatives for displaying this type of data including the technique
described above:

http://www.daiglenet.com/msaccess.htm
 
Back
Top