Results 1 to 2 of 2
  1. #1
    aquaraider is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2009
    Posts
    14

    Question Change backcolor in a Continuous Forms depends on box's value

    Hello,



    I'm now trying to create a small notice board , it is a continuous form, display a list of orders, each order can have 2 status, yes and no.

    I want to make yes rows' status box blue, and no rows' status box red

    Here's part of my code

    Private Sub Form_Load()
    Select Case Me.[RecordStatus]
    Case 1 'means no
    Me.[RecordStatus].BackColor = 255 'red
    Case 2 'means yes
    Me.[RecordStatus].BackColor = 16737843 'blue
    End Select
    Me.Repaint
    End Sub
    I know this will cause problem, it will check 1st record's status, if 1st is no, all records become red or blue if 1st is yes.

    What I really want is all yes records in blue and all no records in red in this form.

    But I've no idea how I can do this, how can I write code like

    If this row is no then this row's color is red
    Else is red
    End if

    Please give me some ideas.

    Thanks very much.

  2. #2
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    You need to look at conditional formatting of the control to set the background colour.

    David

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 10-16-2009, 02:47 PM
  2. cascading combo boxes on Continuous Forms
    By Jerry8989 in forum Forms
    Replies: 0
    Last Post: 10-12-2009, 10:02 AM
  3. Replies: 1
    Last Post: 03-18-2009, 12:30 AM
  4. Replies: 3
    Last Post: 09-06-2008, 10:19 AM
  5. Forms: Not immediate change of database
    By firlanu in forum Forms
    Replies: 5
    Last Post: 08-11-2008, 12:04 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums