how do i get a combobox set to a specific value based upon the text entered in a text box

  • Thread starter Thread starter mpjm
  • Start date Start date
M

mpjm

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
 
Sub YourTextControl_AfterUpdate( )
If IsNull(Me!YourTextControl) or Len(ME!YourTextControl)<1 Then
Me!YourComboControlName = "No"
Else
Me!YourComboControlName = "Yes"
End If
End Sub
 
thank you! that worked perfectly.

Sub YourTextControl_AfterUpdate( )
If IsNull(Me!YourTextControl) or Len(ME!YourTextControl)<1 Then
Me!YourComboControlName = "No"
Else
Me!YourComboControlName = "Yes"
End If
End Sub
--
Of course have the combo control default to "no" for new records
---

SA
ACG Soft
http://www.groupacg.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top