Can I change the color of a form based on status?

B

Bandit

I have a form for work orders. I track the work order number, part number,
serial number, etc. I would like to add a combo box with work order status
Open/Closed. I know how to do this part. I was wondering if I can link a
command that will change the color of either the box or the form based on the
current status of the work order. When I scroll through the work order form
I rapidly know which work orders are open and closed based on the color. The
parts are shipped out to various agencies for repair and sometimes it may be
months before we see our parts back. Once a week I go through my work order
form to check to see which parts are still outstanding. I just want to make
it easier to do this and reduce the chances of me missing a record. I
usually call for a status once a week or once every two weeks. The other
idea is to run a query looking for only open work orders, but wouldn't I have
to run a new query every week? Any ideas would be much appreicated. Thanks
 
B

BruceM

One way is to use conditional formatting. Click into the text box, then
click Format > Conditional Formatting. I think it will be pretty clear once
you get there.
I don't quite understand your question about the query. You can select the
records you need any time you want. One way is to do something like this in
a command button's Click event:

Dim strSQL as string

strSQL = "[Status] = 'Open' "
Me.Filter = strSQL
Me.FilterOn = Not Me.FilterOn

This will let you toggle between all work orders and just the open work
orders.
 
D

Daniel Pineault

Bruce has a good point. I forgot about it because I'm so used to having to
deal with multiple cases, but if you only have 2 or 3 case than conditional
formatting is the way to go.

Create a rectangle in the background of your form. Then select it and Click
Format from the standard menu and select conditional formatting. Then build
your different cases based on the status value! And your done.
--
Hope this helps,

Daniel Pineault




BruceM said:
One way is to use conditional formatting. Click into the text box, then
click Format > Conditional Formatting. I think it will be pretty clear once
you get there.
I don't quite understand your question about the query. You can select the
records you need any time you want. One way is to do something like this in
a command button's Click event:

Dim strSQL as string

strSQL = "[Status] = 'Open' "
Me.Filter = strSQL
Me.FilterOn = Not Me.FilterOn

This will let you toggle between all work orders and just the open work
orders.

Bandit said:
I have a form for work orders. I track the work order number, part number,
serial number, etc. I would like to add a combo box with work order
status
Open/Closed. I know how to do this part. I was wondering if I can link a
command that will change the color of either the box or the form based on
the
current status of the work order. When I scroll through the work order
form
I rapidly know which work orders are open and closed based on the color.
The
parts are shipped out to various agencies for repair and sometimes it may
be
months before we see our parts back. Once a week I go through my work
order
form to check to see which parts are still outstanding. I just want to
make
it easier to do this and reduce the chances of me missing a record. I
usually call for a status once a week or once every two weeks. The other
idea is to run a query looking for only open work orders, but wouldn't I
have
to run a new query every week? Any ideas would be much appreicated.
Thanks
 
B

BruceM

I was just thinking about the text box itself. The background rectangle
hadn't occurred to me. However, I think filtering (or changing the
recordsource) would be of benefit to the OP whether or not a color is used
to flag a record.

Daniel Pineault said:
Bruce has a good point. I forgot about it because I'm so used to having
to
deal with multiple cases, but if you only have 2 or 3 case than
conditional
formatting is the way to go.

Create a rectangle in the background of your form. Then select it and
Click
Format from the standard menu and select conditional formatting. Then
build
your different cases based on the status value! And your done.
--
Hope this helps,

Daniel Pineault




BruceM said:
One way is to use conditional formatting. Click into the text box, then
click Format > Conditional Formatting. I think it will be pretty clear
once
you get there.
I don't quite understand your question about the query. You can select
the
records you need any time you want. One way is to do something like this
in
a command button's Click event:

Dim strSQL as string

strSQL = "[Status] = 'Open' "
Me.Filter = strSQL
Me.FilterOn = Not Me.FilterOn

This will let you toggle between all work orders and just the open work
orders.

Bandit said:
I have a form for work orders. I track the work order number, part
number,
serial number, etc. I would like to add a combo box with work order
status
Open/Closed. I know how to do this part. I was wondering if I can
link a
command that will change the color of either the box or the form based
on
the
current status of the work order. When I scroll through the work order
form
I rapidly know which work orders are open and closed based on the
color.
The
parts are shipped out to various agencies for repair and sometimes it
may
be
months before we see our parts back. Once a week I go through my work
order
form to check to see which parts are still outstanding. I just want to
make
it easier to do this and reduce the chances of me missing a record. I
usually call for a status once a week or once every two weeks. The
other
idea is to run a query looking for only open work orders, but wouldn't
I
have
to run a new query every week? Any ideas would be much appreicated.
Thanks
 
B

Bandit

Thank you,
--
Bandit


BruceM said:
I was just thinking about the text box itself. The background rectangle
hadn't occurred to me. However, I think filtering (or changing the
recordsource) would be of benefit to the OP whether or not a color is used
to flag a record.

Daniel Pineault said:
Bruce has a good point. I forgot about it because I'm so used to having
to
deal with multiple cases, but if you only have 2 or 3 case than
conditional
formatting is the way to go.

Create a rectangle in the background of your form. Then select it and
Click
Format from the standard menu and select conditional formatting. Then
build
your different cases based on the status value! And your done.
--
Hope this helps,

Daniel Pineault




BruceM said:
One way is to use conditional formatting. Click into the text box, then
click Format > Conditional Formatting. I think it will be pretty clear
once
you get there.
I don't quite understand your question about the query. You can select
the
records you need any time you want. One way is to do something like this
in
a command button's Click event:

Dim strSQL as string

strSQL = "[Status] = 'Open' "
Me.Filter = strSQL
Me.FilterOn = Not Me.FilterOn

This will let you toggle between all work orders and just the open work
orders.

I have a form for work orders. I track the work order number, part
number,
serial number, etc. I would like to add a combo box with work order
status
Open/Closed. I know how to do this part. I was wondering if I can
link a
command that will change the color of either the box or the form based
on
the
current status of the work order. When I scroll through the work order
form
I rapidly know which work orders are open and closed based on the
color.
The
parts are shipped out to various agencies for repair and sometimes it
may
be
months before we see our parts back. Once a week I go through my work
order
form to check to see which parts are still outstanding. I just want to
make
it easier to do this and reduce the chances of me missing a record. I
usually call for a status once a week or once every two weeks. The
other
idea is to run a query looking for only open work orders, but wouldn't
I
have
to run a new query every week? Any ideas would be much appreicated.
Thanks
 
B

BruceM

Glad to help.

Bandit said:
Thank you,
--
Bandit


BruceM said:
I was just thinking about the text box itself. The background rectangle
hadn't occurred to me. However, I think filtering (or changing the
recordsource) would be of benefit to the OP whether or not a color is
used
to flag a record.

Daniel Pineault said:
Bruce has a good point. I forgot about it because I'm so used to
having
to
deal with multiple cases, but if you only have 2 or 3 case than
conditional
formatting is the way to go.

Create a rectangle in the background of your form. Then select it and
Click
Format from the standard menu and select conditional formatting. Then
build
your different cases based on the status value! And your done.
--
Hope this helps,

Daniel Pineault




:

One way is to use conditional formatting. Click into the text box,
then
click Format > Conditional Formatting. I think it will be pretty
clear
once
you get there.
I don't quite understand your question about the query. You can
select
the
records you need any time you want. One way is to do something like
this
in
a command button's Click event:

Dim strSQL as string

strSQL = "[Status] = 'Open' "
Me.Filter = strSQL
Me.FilterOn = Not Me.FilterOn

This will let you toggle between all work orders and just the open
work
orders.

I have a form for work orders. I track the work order number, part
number,
serial number, etc. I would like to add a combo box with work order
status
Open/Closed. I know how to do this part. I was wondering if I can
link a
command that will change the color of either the box or the form
based
on
the
current status of the work order. When I scroll through the work
order
form
I rapidly know which work orders are open and closed based on the
color.
The
parts are shipped out to various agencies for repair and sometimes
it
may
be
months before we see our parts back. Once a week I go through my
work
order
form to check to see which parts are still outstanding. I just want
to
make
it easier to do this and reduce the chances of me missing a record.
I
usually call for a status once a week or once every two weeks. The
other
idea is to run a query looking for only open work orders, but
wouldn't
I
have
to run a new query every week? Any ideas would be much appreicated.
Thanks
 

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

Top