Checkboxes conditions

P

PRAV

Hi I'm using MS Access 97. I have a continous form to give a progress
summary. An item can have many parts and therefore has 10 checkboxes
which can represent on time, late or very late. The checkboxes table
contains all the checkboxes related to an item and is linked to the
item table (master). I need to represent a green box with an unchecked
box for the on time, late by a checked box or very late by a red
backgound checked box. I created a green/red rectangle with a checkbox
on top of the rectangle. As there is no conditional formatting in ms
access 97, how can i implement this functionality.
 
P

PRAV

I have been trying all day and i think its quite imposible. Therefore
instead of have checkboxes, i will have a green textbox for 'on time',
a yellow textbox for late and a red one for very late. In my table i'll
set the 30 fields as text which will be polulated from the Progress
Form when the user enters the dates. Infomation gather from the
internet, i will need to place the 3 coloured invisible textboxes on
each other and will be made visible when the appropriate field has
either a 'C', 'L' & 'VL'. Where should i enter that condition, in the
form_load or Validation rule of the textboxes. Could please give me an
example. thank you.. Therefore instead of have checkboxes, i will have
a green textbox for 'on time', a yellow textbox for late and a red one
for very late. In my table i'll set the 30 fields as text which will be
polulated from the Progress Form when the user enters the dates.
Infomation gather from the internet, i will need to place the 3
coloured invisible textboxes on each other and will be made visible
when the appropriate field has either a 'C', 'L' & 'VL'. Where should i
enter that condition, in the form_load or Validation rule of the
textboxes. Could please give me an example. thank you.
 
S

strive4peace

Hi Prave,

here is one way:

put your calculations in the recordset of the form so that the results
are different for each record

instead of checkboxes being visible or not ... every record for a
continuous form will be the same so you cannot alter the form... what
you can do have differences in the records...

on the grid for the form recordset:

field --> GreenText: iif(GreenConditions, "On Time","")

field --> YellowText: iif(YellowConditions, "Late","")

field --> RedText: iif(RedConditions, "Very Very Late","")

where
GreenConditions are the conditions resulting in the 'On time' status
being awarded
.... likewise for YellowConditions and RedConditions

example conditions:

[someBooleanField] <> False
not IsNull([someDate])
not IsNull([someDate]) and nz([PaidAmount])<>0
[someTxtField] = 'C'

then, on your form, make controls for and position GreenText,
YellowText, and RedText on top of each other. Make their backgrounds
transparent. If your logic is right, only one will contain a value and
it's foreground can be colored to indicate which it is. You will not be
able to change your labels over the column, so you may want to stack
your labels (or leave them on one line if they are short) and color-code
then in the heading

OnTime Late VeryLate

where
OnTime is green
Late is Yellow
VeryLate is Red

or whatever are the forecolors you are using to differentiate...

if you change the data in the form, you will need to save it and requery
the recordset or refresh the calculations or repaint the form --
whichever works and you like to see the changes.


Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
P

PRAV

Hi i'm a bit uunsure how to implement that

on the grid for the form recordset:


field --> GreenText: iif(GreenConditions, "On Time","")


field --> YellowText: iif(YellowConditions, "Late","")


field --> RedText: iif(RedConditions, "Very Very Late","")

where should i add this - to the control source or the validation rule.


Hi Prave,

here is one way:

put your calculations in the recordset of the form so that the results
are different for each record

instead of checkboxes being visible or not ... every record for a
continuous form will be the same so you cannot alter the form... what
you can do have differences in the records...

on the grid for the form recordset:

field --> GreenText: iif(GreenConditions, "On Time","")

field --> YellowText: iif(YellowConditions, "Late","")

field --> RedText: iif(RedConditions, "Very Very Late","")

where
GreenConditions are the conditions resulting in the 'On time' status
being awarded
... likewise for YellowConditions and RedConditions

example conditions:

[someBooleanField] <> False
not IsNull([someDate])
not IsNull([someDate]) and nz([PaidAmount])<>0
[someTxtField] = 'C'

then, on your form, make controls for and position GreenText,
YellowText, and RedText on top of each other. Make their backgrounds
transparent. If your logic is right, only one will contain a value and
it's foreground can be colored to indicate which it is. You will not be
able to change your labels over the column, so you may want to stack
your labels (or leave them on one line if they are short) and color-code
then in the heading

OnTime Late VeryLate

where
OnTime is green
Late is Yellow
VeryLate is Red

or whatever are the forecolors you are using to differentiate...

if you change the data in the form, you will need to save it and requery
the recordset or refresh the calculations or repaint the form --
whichever works and you like to see the changes.


Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*


I have been trying all day and i think its quite imposible. Therefore
instead of have checkboxes, i will have a green textbox for 'on time',
a yellow textbox for late and a red one for very late. In my table i'll
set the 30 fields as text which will be polulated from the Progress
Form when the user enters the dates. Infomation gather from the
internet, i will need to place the 3 coloured invisible textboxes on
each other and will be made visible when the appropriate field has
either a 'C', 'L' & 'VL'. Where should i enter that condition, in the
form_load or Validation rule of the textboxes. Could please give me an
example. thank you.. Therefore instead of have checkboxes, i will have
a green textbox for 'on time', a yellow textbox for late and a red one
for very late. In my table i'll set the 30 fields as text which will be
polulated from the Progress Form when the user enters the dates.
Infomation gather from the internet, i will need to place the 3
coloured invisible textboxes on each other and will be made visible
when the appropriate field has either a 'C', 'L' & 'VL'. Where should i
enter that condition, in the form_load or Validation rule of the
textboxes. Could please give me an example. thank you.
 
S

strive4peace

Hi Prav,

I am referring to the query or SQL that your form is based on... if your
form is based on a table, do this:

RecordSource -->
SELECT * FROM Tablename

in the properties (View, Properties from the menu. Edit, Select Form
from menu) for the form... Data tab, RecordSource property ... where you
would put the table name, query name, or SQL statement ... click on the
builder button (...) to the right

there you will see the grid

"field --> " refers to the field row on the grid...

field --> ColumnName: expression

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*


Hi i'm a bit uunsure how to implement that

on the grid for the form recordset:


field --> GreenText: iif(GreenConditions, "On Time","")


field --> YellowText: iif(YellowConditions, "Late","")


field --> RedText: iif(RedConditions, "Very Very Late","")

where should i add this - to the control source or the validation rule.


Hi Prave,

here is one way:

put your calculations in the recordset of the form so that the results
are different for each record

instead of checkboxes being visible or not ... every record for a
continuous form will be the same so you cannot alter the form... what
you can do have differences in the records...

on the grid for the form recordset:

field --> GreenText: iif(GreenConditions, "On Time","")

field --> YellowText: iif(YellowConditions, "Late","")

field --> RedText: iif(RedConditions, "Very Very Late","")

where
GreenConditions are the conditions resulting in the 'On time' status
being awarded
... likewise for YellowConditions and RedConditions

example conditions:

[someBooleanField] <> False
not IsNull([someDate])
not IsNull([someDate]) and nz([PaidAmount])<>0
[someTxtField] = 'C'

then, on your form, make controls for and position GreenText,
YellowText, and RedText on top of each other. Make their backgrounds
transparent. If your logic is right, only one will contain a value and
it's foreground can be colored to indicate which it is. You will not be
able to change your labels over the column, so you may want to stack
your labels (or leave them on one line if they are short) and color-code
then in the heading

OnTime Late VeryLate

where
OnTime is green
Late is Yellow
VeryLate is Red

or whatever are the forecolors you are using to differentiate...

if you change the data in the form, you will need to save it and requery
the recordset or refresh the calculations or repaint the form --
whichever works and you like to see the changes.


Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*


I have been trying all day and i think its quite imposible. Therefore
instead of have checkboxes, i will have a green textbox for 'on time',
a yellow textbox for late and a red one for very late. In my table i'll
set the 30 fields as text which will be polulated from the Progress
Form when the user enters the dates. Infomation gather from the
internet, i will need to place the 3 coloured invisible textboxes on
each other and will be made visible when the appropriate field has
either a 'C', 'L' & 'VL'. Where should i enter that condition, in the
form_load or Validation rule of the textboxes. Could please give me an
example. thank you.. Therefore instead of have checkboxes, i will have
a green textbox for 'on time', a yellow textbox for late and a red one
for very late. In my table i'll set the 30 fields as text which will be
polulated from the Progress Form when the user enters the dates.
Infomation gather from the internet, i will need to place the 3
coloured invisible textboxes on each other and will be made visible
when the appropriate field has either a 'C', 'L' & 'VL'. Where should i
enter that condition, in the form_load or Validation rule of the
textboxes. Could please give me an example. thank you.


PRAV wrote:
Hi I'm using MS Access 97. I have a continous form to give a progress
summary. An item can have many parts and therefore has 10 checkboxes
which can represent on time, late or very late. The checkboxes table
contains all the checkboxes related to an item and is linked to the
item table (master). I need to represent a green box with an unchecked
box for the on time, late by a checked box or very late by a red
backgound checked box. I created a green/red rectangle with a checkbox
on top of the rectangle. As there is no conditional formatting in ms
access 97, how can i implement this functionality.
 

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