By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,967 Members | 1,179 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,967 IT Pros & Developers. It's quick & easy.

Changing a text box to a combobox on an open form.

P: n/a
I have a form where I want a text box to change into a combobox if the
user makes a certain selection in another control. Is this possible
and if so, how?
Thanks in advance for any help offered.
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You can only change controls like this in design view - never in form view.

What you CAN do is to have two controls on your form, a textbox and a
combobox (they can even both use the same ControlSource), and change their
Visible properties in the AfterUpdate event procedure of the "other
control".

HTH
- Turtle

"Chris Thompson" <ch*************@homeoffice.gsi.gov.uk> wrote in message
news:19**************************@posting.google.c om...
I have a form where I want a text box to change into a combobox if the
user makes a certain selection in another control. Is this possible
and if so, how?
Thanks in advance for any help offered.

Nov 13 '05 #2

P: n/a
You can't change the form at runtime, you can however place two field types on
the form with the same source and using the AfterUpdate event in your field,
using an If, Then Else statement

If txtField = "ABC" Then
txtField1.visible = False
cboField.visible = True
Else
txtField1.visible =True
cboField.visible = False
End If

this is just air code.

Michael
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.