Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Posts
    115

    Unanswered: Highlight current field when have multi sub forms

    I have multiple (Continuous Forms) sub forms on one main form

    I'm using on got focus = clolorYellow([myfield])
    on lost focus = clolorWhite([myfield])

    Then public function clolorYellow(fieldname as control)
    Fieldname. backColor = 65535
    End function

    2 issues
    One, this function select that column (not just that record.)
    Two, when I go to the second sub form, the first form field stays highlighted, I guess the on lost focus doesn't work because that field also has the focus.
    Any help?
    Thanks

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    When a form is open in continuous or datasheet view, only the conditional formatting features can be used to change the appearance of a control based on some condition on an individual (i.e. row) base. Everything else will change the controls of the whole column.
    Have a nice day!

  3. #3
    Join Date
    Jan 2004
    Posts
    115
    Thanks,
    this answers the issue of coloring current control.
    Do you also have a solution of the issue that 2 sub forms are open at once, and both are highlighted?
    Thanks

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    When you use the conditional formatting features of a control, it's appearance does not change whether it has the focus or not. Only the condition(s) you specified in the conditional formatting window matters. If the conditions are the same in both subforms, the specified format will be applied to the control(s) in both subforms.
    Have a nice day!

Posting Permissions

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