Color Code - 3 different fuctions that i will be using access for

A

amc

I created a database (a table) using access 2000 for my company and I am
using it to track assignments. What I would like to know is - is there some
way that I can color code assisgnments (for example - Green: is for new
assignments - Red: for closed - and Yellow: for pending). I am trying to
highlight each line (with a different color) - (like you can do, if your
using excel (using the 'bucket')). Is this possible to do using Access?
 
R

Rob Parker

First point: a table is not a database! A table (in an Access database) is
an objext where data is stored; there may be one (unusual in Access),
several, or hundreds for a single Access database.

Second, it seems that you are wanting to do this in the table itself. You
can't, and you shouldn't. Tables should not be exposed to the user(s);
instead, you should have forms (on-screen display for data entry and
editing) and reports (for printing).

Both forms and reports will allow you to do this, using conditional
formatting. Read the Help file. You can set up to three conditional
formats (which you'll need to do for each textbox control); you'd set the
condition for each control based on an expression containing the Status
field.

HTH,

Rob
 
S

Stockwell43

Hi amc,

First of all do not input directly to the table. Tables are for storing data
and forms are for inputting. Create a form with the fields on the table using
the wizard it's not hard. As for your request.

There are probably many ways and a lot of these guys are top notch. However,
I would create a Combo Box for your Status and use this code (changing Status
to the name of your combo box field and the numbers to the colors you want)
Keep in mind there are better ways, but this will get you started.

Private Sub Status_Click()
If Me.Status = "Complete" Then
Me.Status.BackColor = "255"

ElseIf Me.Status = "In Process" Then
Me.Status.BackColor = "16777215"

ElseIf Me.Status = "Pending" Then
Me.Status.BackColor = "0"
Else
End If
End Sub
 

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