Results 1 to 8 of 8
  1. #1
    ZOMB13 is offline Novice
    Windows 8 Access 2007
    Join Date
    Apr 2015
    Posts
    11

    Conditional Formatting Date and Checkbox question?

    Hi all,

    Please find attached, my simple access 2007 database. I’m rather terrible at explaining things; so bare with me. I have recently begun construction of a simple database that manages my ever growing collection of TV shows. On my database I have a form with a subform showing which seasons I have purchased for the respective series. I want my database visually represent when a series due date has passed and I have not bought it. Ie. I wish to change the colour of multiple fields on the subform if a separate checkbox has not been checked and a certain date has passed. I believe conditional formatting is the best choice for this. Is it possible to change the colour of multiple fields if a separate checkbox field has not been checked and the release date has passed the system date? I hope this makes sense, Thanks in advance.

    TV.accdbZOMB13.

  2. #2
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    Is it possible to change the colour of multiple fields if a separate checkbox field has not been checked and the release datehas passed the system date?
    yes - you would use the 'Expression Is' option.

    Note the rule has to be applied to each control you want to format, you can set the rule for multiple rules at the same time by highlighting the controls you want to format before selecting conditional formatting

    Certain controls cannot be conditionally formatted such as check boxes and buttons

  3. #3
    ZOMB13 is offline Novice
    Windows 8 Access 2007
    Join Date
    Apr 2015
    Posts
    11
    Ajax,

    This might be a bit presumptuous, but is it all possible you could take a look at my database and do exactly that for me and re-upload it so I can see how it’s done? I mean, what you’re saying makes perfect sense but I don’t really have the knowhow with regard to the conditional formatting expressions.

    Thanks again, ZOMB13

  4. #4
    ZOMB13 is offline Novice
    Windows 8 Access 2007
    Join Date
    Apr 2015
    Posts
    11
    Quote Originally Posted by Ajax View Post
    yes - you would use the 'Expression Is' option.

    Note the rule has to be applied to each control you want to format, you can set the rule for multiple rules at the same time by highlighting the controls you want to format before selecting conditional formatting

    Certain controls cannot be conditionally formatted such as check boxes and buttons
    Ajax,

    This might be a bit presumptuous, but is it all possible you could take a look at my database and do exactly that for me and re-upload it so I can see how it’s done? I mean, what you’re saying makes perfect sense but I don’t really have the knowhow with regard to the conditional formatting expressions.

    Thanks again, ZOMB13

  5. #5
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    I'll take a look if you want to upload it - may be tomorrow by the time I get back to you due to work commitments.

    If it is not clear from what you upload, please advise the name of the form, the controls to be formatted and the controls the formatting refers to e.g. 'if a separate checkbox has not been checked and a certain date has passed.'

  6. #6
    ZOMB13 is offline Novice
    Windows 8 Access 2007
    Join Date
    Apr 2015
    Posts
    11
    Quote Originally Posted by Ajax View Post
    I'll take a look if you want to upload it - may be tomorrow by the time I get back to you due to work commitments.

    If it is not clear from what you upload, please advise the name of the form, the controls to be formatted and the controls the formatting refers to e.g. 'if a separate checkbox has not been checked and a certain date has passed.'
    Ajax,

    TV.accdb

    Awesome, thanks so much. It should be rather straight forward once you open the database (it’s in a very premature state). The main form for viewing the records is called “frm_shows”, the subform with the controls is embedded on this form. I want the “Season” and “Release” controls to be formatted with a red background if the checkbox (which is also part of this subform) is not checked and the date in the “released” control is older than the current date. Ie. When a new season of a TV series is released and I have not checked the checkbox to say that I have bought it, It highlights the “Season” and “Release” controls to let me know that it has been released and that I should buy it. I hope this makes sense. Thanks,

    ZOMB13.

  7. #7
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    quicker than I thought

    please see attached.

    I've changed your release date field type from text to date and renamed 'released' and renamed your controls to something meaningful.

    Moving forward, you need to learn about primary keys and indexing, otherwise your db will become very slow. Suggest you also need to learn about using lookup tables - not lookup fields - (for Genre/Theme in particular) and naming conventions i.e. avoid spaces and non alpha numeric characters - such a /. They will come back and bite you in the future.
    Attached Files Attached Files

  8. #8
    ZOMB13 is offline Novice
    Windows 8 Access 2007
    Join Date
    Apr 2015
    Posts
    11
    Quote Originally Posted by Ajax View Post
    quicker than I thought

    please see attached.

    I've changed your release date field type from text to date and renamed 'released' and renamed your controls to something meaningful.

    Moving forward, you need to learn about primary keys and indexing, otherwise your db will become very slow. Suggest you also need to learn about using lookup tables - not lookup fields - (for Genre/Theme in particular) and naming conventions i.e. avoid spaces and non alpha numeric characters - such a /. They will come back and bite you in the future.
    Ajax,

    Firstly, you’re a legend! That’s exactly what I wanted. I most definitely intend to learn more with regard to the aforementioned aspects of database development especially primary keys and indexing. Thanks again.

    ZOMB13

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

Similar Threads

  1. Replies: 4
    Last Post: 01-31-2014, 06:57 PM
  2. Replies: 10
    Last Post: 02-14-2013, 12:12 PM
  3. conditional formatting of a checkbox
    By survivo01 in forum Forms
    Replies: 7
    Last Post: 02-07-2013, 04:29 PM
  4. Date Conditional Formatting
    By f15avionics in forum Access
    Replies: 3
    Last Post: 09-21-2012, 04:45 AM
  5. Newbie VBA question (conditional formatting)
    By alhas in forum Programming
    Replies: 7
    Last Post: 01-16-2012, 08:07 AM

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