Making something visible based on a condition

  • Thread starter Thread starter Cathy
  • Start date Start date
C

Cathy

I have a main form/subform senario. In the subform I
would like to make a field visible/not visible based on
the value in another field.

I have build a macro with a condition on the subform form
load. The condition is:(example) Field2 = yes. When I
only have one record in the subform, this works great.
But when I have several records, all of the records
conform to whatever the first record's value is. So if
the first record is 'yes', all of the records are visible.

How can I make this work so that it handles each record
independently?

Thank you,
Cathy
 
Hi Cathy,

On a continuous form this is expected - there is only one control, it is
just displayed multiple times for each visible row. Any modification to the
properties of a control will be apparent on all rows of a continuous form
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.

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

Thanks for your response, but I'm not trying to change
formatting... I'm trying to make something visible and not
visible based on the value of another field. Is there a
way to do this on a continuous form?

Cathy
-----Original Message-----
Hi Cathy,

On a continuous form this is expected - there is only one control, it is
just displayed multiple times for each visible row. Any modification to the
properties of a control will be apparent on all rows of a continuous form
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.

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 main form/subform senario. In the subform I
would like to make a field visible/not visible based on
the value in another field.

I have build a macro with a condition on the subform form
load. The condition is:(example) Field2 = yes. When I
only have one record in the subform, this works great.
But when I have several records, all of the records
conform to whatever the first record's value is. So if
the first record is 'yes', all of the records are visible.

How can I make this work so that it handles each record
independently?

Thank you,
Cathy


.
 
Hi Cathy,

I meant to add that conditional formatting doesn't allow you to hide field but I guess you already figured that out :-)

In a continuous form there really isn't a way to do this, you can enable/disable controls or change their color but that's about it. Instead you might want to go to a listbox with a synchronized detail form.

Why do you need to hide a control? Usually I find that I don't *really* need to hide a control - how important is it?

Sandra,

Thanks for your response, but I'm not trying to change
formatting... I'm trying to make something visible and not
visible based on the value of another field. Is there a
way to do this on a continuous form?

Cathy
-----Original Message-----
Hi Cathy,

On a continuous form this is expected - there is only one control, it is
just displayed multiple times for each visible row. Any modification to the
properties of a control will be apparent on all rows of a continuous form
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.

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 main form/subform senario. In the subform I
would like to make a field visible/not visible based on
the value in another field.

I have build a macro with a condition on the subform form
load. The condition is:(example) Field2 = yes. When I
only have one record in the subform, this works great.
But when I have several records, all of the records
conform to whatever the first record's value is. So if
the first record is 'yes', all of the records are visible.

How can I make this work so that it handles each record
independently?

Thank you,
Cathy


.
 
Sandra,

My todo is to create a form/subform that attaches to a
calendar. The form/subform has a list of the users daily
todos based on the date they picked from the calendar and
their ID. The thing that sets this calendar apart from
the norm is that the users is supposed to click a checkbox
when they've completed an item. This logs the users ID
and date/time in a table. If their supervisor is supposed
to review the item, there should be a check box for them.
And if the manager needs to review the item, there should
be a check box for them. The problem I'm having is making
the checkboxes appear only on rows where the supervisor
and/or manager need to approve/review an item.

Thanks,
Cathy

-----Original Message-----
Hi Cathy,

I meant to add that conditional formatting doesn't allow
you to hide field but I guess you already figured that
out :-)
In a continuous form there really isn't a way to do this,
you can enable/disable controls or change their color but
that's about it. Instead you might want to go to a listbox
with a synchronized detail form.
Why do you need to hide a control? Usually I find that I
don't *really* need to hide a control - how important is
it?
Sandra,

Thanks for your response, but I'm not trying to change
formatting... I'm trying to make something visible and not
visible based on the value of another field. Is there a
way to do this on a continuous form?

Cathy
-----Original Message-----
Hi Cathy,

On a continuous form this is expected - there is only
one
control, it is
just displayed multiple times for each visible row.
Any
modification to the
properties of a control will be apparent on all rows
of a
continuous form
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.

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.


Cathy wrote:
I have a main form/subform senario. In the subform I
would like to make a field visible/not visible based on
the value in another field.

I have build a macro with a condition on the subform form
load. The condition is:(example) Field2 = yes. When I
only have one record in the subform, this works great.
But when I have several records, all of the records
conform to whatever the first record's value is. So if
the first record is 'yes', all of the records are visible.

How can I make this work so that it handles each record
independently?

Thank you,
Cathy


.
.
 
Try enabling/disabling the buttons based on whatever condition tells you who
needs to review the item. Another work around I've used is still along the
lines of an abbreviated list (listbox or subform) paired with a detail
subform that shows the detail of the currently selected record in the list.
Instead of using checkboxes, use a text field (yes, no or even a checkmark
from the wingdings font). Using an expression, set the value of the
textfield so that it is empty when the value is not true.

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

Sandra,

My todo is to create a form/subform that attaches to a
calendar. The form/subform has a list of the users daily
todos based on the date they picked from the calendar and
their ID. The thing that sets this calendar apart from
the norm is that the users is supposed to click a checkbox
when they've completed an item. This logs the users ID
and date/time in a table. If their supervisor is supposed
to review the item, there should be a check box for them.
And if the manager needs to review the item, there should
be a check box for them. The problem I'm having is making
the checkboxes appear only on rows where the supervisor
and/or manager need to approve/review an item.

Thanks,
Cathy

-----Original Message-----
Hi Cathy,

I meant to add that conditional formatting doesn't allow
you to hide field but I guess you already figured that
out :-)
In a continuous form there really isn't a way to do this,
you can enable/disable controls or change their color but
that's about it. Instead you might want to go to a listbox
with a synchronized detail form.
Why do you need to hide a control? Usually I find that I
don't *really* need to hide a control - how important is
it?
Sandra,

Thanks for your response, but I'm not trying to change
formatting... I'm trying to make something visible and not
visible based on the value of another field. Is there a
way to do this on a continuous form?

Cathy

-----Original Message-----
Hi Cathy,

On a continuous form this is expected - there is only one control,
it is just displayed multiple times for each visible row. Any
modification to the properties of a control will be apparent on
all rows of a continuous form 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.

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.


Cathy wrote:
I have a main form/subform senario. In the subform I
would like to make a field visible/not visible based on
the value in another field.

I have build a macro with a condition on the subform form
load. The condition is:(example) Field2 = yes. When I
only have one record in the subform, this works great.
But when I have several records, all of the records
conform to whatever the first record's value is. So if
the first record is 'yes', all of the records are visible.

How can I make this work so that it handles each record
independently?

Thank you,
Cathy


.
.
 
Back
Top