Combo Box with Text Box

Neo90815

Registered User.
Local time
Today, 00:52
Joined
Jul 26, 2000
Messages
64
Hi,

Anyone know how to create a combox box with a text box. If user select an item in the combox box a text box with appear and asked user to enter data.

For example; I have a combo box with the following available selections; Open, Pending, Closed. Once user select "Closed" from the combo box, a text a box would appear for user to enter the closed date.

I would think, I probably have to create a look up field and within at lookup field is another lookup field...I don't know..

Anyone one know how to do this? Thanks million in advance.
 
You would have a text box already in your form with its visible property set to "No". Once a condition is met, it will set the visible property to "Yes" ready for input.
Try the following:

Private Sub Status_AfterUpdate()
If Status = Closed Then
TextBox: CloseDate.Visible = True
CloseDate.SetFocus
Else
Me.CloseDate.Visible = False

End If

End Sub

Change the names as appropriate, I have used Status for your combobox name and CloseDate for your textfield name.

Good luck.
 
Carol,

Your a life saver! It works! But, maybe I need additional codes.

I don't know much about VB. The code as suggested works but the text box would appear no mater what I selected; Open, Pending, Closed, etc.

Thanks again.
 

Users who are viewing this thread

Back
Top Bottom