Color Again

  • Thread starter Thread starter Froto
  • Start date Start date
F

Froto

Would like to know if this is possible? I have created a
calendar in access to record the days the managers are
out of the office. What I would like to do is when the
user doubleclicks on square that pertans to a certain day
the background color to red and stay that way until the
user would single click to bring it back to it's white
color (which is the original color of the square). Right
now I'm using the following code behind the doubleclick
of the square.

Me!square10.BackColor = vbRed

But what's happening is when I close the database and
reopen it the backgroung color of the square is back to
white and not the red which I selected by doubleclicking.

And I don't have an exchage server

Any help would be much appreciated.
 
In your underlying table, add a checkbox field. Put a checkbox on your form
(you can make it invisible), tie it to the table, then in the on current
event of the form, add
If Me!Check1.Value = True Then
Me!square10.BackColor = vbRed
Else
Me!square10.BackColor = vbWhite
End If

In your click and doubleclick events for the square, add a line that sets
the check value

Me!Check1.Value = True
or false as the case may be.


HTH
Damon
 
Back
Top