Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2008

    Unanswered: Testing results of Conditional Formatting

    I'm using conditional formatting in a subform using continuous forms. If a user is assigned to a record, the date field is enabled with a white background. If a user is not assigned to a record the date field is disabled with a grey background. This appears to work properly

    Adjacent to the date field is a button to pop-up a calendar to select a date to populate the date field.

    When clicking on the calendar button, I'm testing the date field Enabled property to allow the calendar to display when the date field Enabled property = True. If Enabled = False, the button does nothing.

    The problem is that the Enabled property always tests True. The if statement does not seem to recognize the current state (enabled or not) of the date field:

    "If Forms!Frm_Work_Order!Subform_TDD_List!Anticipated_ Start_Date_CY.Enabled = True Then"

    Is there a flaw using conditional formatting? Any suggestions?



  2. #2
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    This is the second time in two days I've seen this type of question. Apparently Conditional Formatting does not actually change the Enabled (in this case) property, per se. You'll have to use the same basic expression that sets the condition of the Enabled Property of the textbox to control the Enabled Property of the command button, using the Form_Current event in code to do so.
    Hope this helps!

    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Nov 2007
    Adelaide, South Australia
    Yes, conditional formatting has it's limitations!
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts