473,770 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2164
On Feb 17, 12:43 am, x taol <tomi3...@yahoo .comwrote:
i want to change textbox to combobox type using vba.

*** Sent via Developersdexht tp://www.developersd ex.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 Developersdexht tp://www.developersd ex.com***

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

DoCmd.OpenForm "FormName", acDesign
Forms("FormName ").TextBoxName. ControlType=acC omboBox
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 Developersdexht tp://www.developersd ex.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******** *************@n ews.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
1668
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 following line in the afterupdate event of the listbox:
0
1262
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
2353
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
1505
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 created the oledbadapter and successfully created the dataset object. The table in the mdb is tbl1. I named tbl1 as dtTbl1 in the dataset object ds1 and a field called fld1 as dcfld1. I can loop through the dataset and see my data in the console...
2
3672
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
1418
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 there a way to override the preexisting data in the txtbox when I click on it, and then enter a different number? Cheers Ed
22
7483
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" src="AlgemeneFuncties.js"></script> </HEAD> <body onload="InitCombobox(document.VerzamelbladOverzicht.txtKlant1, document.VerzamelbladOverzicht.DDLKlant1);"> <form id="Span2" runat="server">
0
1941
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 almost everything. but it whas made in Visual Studio 7 and i converted it to 2005. in version 7 it works almost perfect but in 2005 i am having some errors. becase all the code i am using is very long i am trying to post the nesecery code only if...
1
1211
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 formY I write in the load event: Formx frmx = new Formx(); txtCustomer.Text = frmx.customerIdTextBox.Text;
0
9619
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10260
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10102
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8933
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.