473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

txtbox 2 combobox using vba


i want to change textbox to combobox type using vba.
*** Sent via Developersdex http://www.developersdex.com ***
Feb 17 '07 #1
6 2153
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


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
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


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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Koen | last post by:
Hi, I have three objects in my form: a listbox (lstform) a subform (fsub) a txtbox (txt) The listbox lists form names that will be displayed in the subform. To do this I use the...
0
by: Paul T. Rong | last post by:
There is a txtbox (time) in a switchboard, I would like to make the time txtbox visible all the time (some big forms block off the time txtbox). Thanks in advance. Paul, Bratislava, Slovakia
3
by: IceColdFire | last post by:
Hi, I am using statements of type TxtBox.Text="Hello \n Hi" But they appear in same line with special character. How to make display in TextBox in different lines.... Thanks C# Pro
5
by: Rich | last post by:
Hello, I am having a problem showing data in a form textbox which is bound to a column in a table in a dataset. I have successfully established a connection to an Access mdb, successfully...
2
by: Boki | last post by:
Hi All, // code start alert("document.all.txtbox"+valueA+".value") // end code could you please advice, can it show the value of txtbox ?
2
by: ebasshead | last post by:
Hi Everybody, I have a txtbox that populates itself when the start of the form is filled out. But sometimes I have to change the info in that specific txtbox. At the moment it wont allow me to. Is...
22
by: asmx126453 | last post by:
hey guys can somonehelp i got an error on rule 3 and it says error: txtbox is empty or not an object this is the code out my aspx page <script language="javascript"...
0
by: asmx126453 | last post by:
Hey mensen I am having some big troubles here i tryd solving it myself with internet for 2 days but i kind fix it. Its about this i have a DotNet project that alrydi is online and working for...
1
by: mailbox73 | last post by:
Hi, c# 2008 express edition. Can anyone please help me figure out why I cannot get any value from one form to another when the controls are databound. (the formY.txtbox lands up empty) in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.