Fill text box based on combo box selection

S

Scott

Hello-

I have a form called frmInquiries. There is a combo box called
cboInqStatus and a text box called txtResolveDate. The two values in
the combo box are "Active" and "Completed". >What I want to do is to
have txtResolveDate filled with the current date once the user changes
the combo box from "Active" to "Completed". Any ideas on this? Thanks
in advance for the help.
 
S

Scott

I think I figured this out with the following code in the After Update
event of the combo box:

Private Sub InquiryStatus_AfterUpdate()
If InquiryStatus = "Completed" Then
Me.ResolveDate = Date
Else
Me.ResolveDate = Null
End If
End Sub
 

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

Top