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

txtbox 2 combobox using vba

P: n/a

i want to change textbox to combobox type using vba.
*** Sent via Developersdex http://www.developersdex.com ***
Feb 17 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On Feb 17, 12:43 am, x taol <tomi3...@yahoo.comwrote:
i want to change textbox to combobox type using vba.

*** Sent via Developersdexhttp://www.developersdex.com***

Ok.
What's the question?

Feb 17 '07 #2

P: n/a


i want to change control type of form.
namely, textbox to combobox using vba code.

*** Sent via Developersdex http://www.developersdex.com ***
Feb 18 '07 #3

P: n/a
On Feb 17, 7:19 pm, x taol <tomi3...@yahoo.comwrote:
i want to change control type of form.
namely, textbox to combobox using vba code.

*** Sent via Developersdexhttp://www.developersdex.com***

Since you clarified your original post I'll assume you are asking how.

DoCmd.OpenForm "FormName", acDesign
Forms("FormName").TextBoxName.ControlType=acComboB ox
DoCmd.Close acForm, FormName, acSaveYes

Feb 18 '07 #4

P: n/a


thank you, storrboy
oh, i want to change the control in not form but table.
i'm sorry.

*** Sent via Developersdex http://www.developersdex.com ***
Feb 18 '07 #5

P: n/a
On Feb 17, 9:37 pm, x taol <tomi3...@yahoo.comwrote:
thank you, storrboy
oh, i want to change the control in not form but table.
i'm sorry.

*** Sent via Developersdexhttp://www.developersdex.com***

Why would you want to do this?
It really is bad practise to allow user to edit the tables directly -
always use forms to do this.
Either way, changing the control type is only possible when opening
the container object in design view.
I can't think of why you would do this to a field during runtime. Make
the changes to the table field and leave it that way.
Feb 18 '07 #6

P: n/a
"x taol" <to******@yahoo.comwrote in message
news:45*********************@news.qwest.net...
thank you, storrboy
oh, i want to change the control in not form but table.
i'm sorry.
On occasion, The Boys and Girls in Redmond have some Very Bad Ideas. One of
the worst of their Very Bad Ideas was "Lookup Fields in Tables" which I
presume is what you mean by "Control in Table". I assure you that you will
indeed "be sorry" if you make the Field in the Table into a Lookup Field --
in time, that will come back to haunt you and make your life more
complicatated and traumatic than you would like.

Larry Linson
Microsoft Access MVP
Feb 19 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.