combo box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mpmason14
    New Member
    • Jun 2006
    • 65

    #1

    combo box

    i am trying to get a form to autoupdate whenever an employee leaves the company. when the employee leaves, the "enddate" box is filled in with their last day and a combo box is to be filled in saying "no" for currently employed.

    i am wondering how to get the combobox to automatically go to "no" when the enddate is filled in and "yes" when the enddate is empty

    any and all ideas/solutions/suggestions appreciated

    thanks
  • mpmason14
    New Member
    • Jun 2006
    • 65

    #2
    this is how you do it:


    Sub YourTextControl _AfterUpdate( )
    If IsNull(Me!YourT extControl) or Len(ME!YourText Control)<1 Then
    Me!YourComboCon trolName = "No"
    Else
    Me!YourComboCon trolName = "Yes"
    End If
    End Sub
    --
    Of course have the combo control default to "no" for new records
    ---

    Comment

    Working...