473,326 Members | 2,099 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,326 software developers and data experts.

Change combobox to textbox in vba

16
Hi I was trying to use this code to change a combo box to a text box :
Me.cboEntry.value = ""
Me.cboEntry.SetFocus
DoCmd.RunCommand acCmdChangeToTextBox

But when i run the application it gives error
Runtime error '2046'
The commant or action "ChangetoTextbox" is not available now

Can anybody help me to do this

"I know i can use alternative method, By putting textbox on top of combobox and making invisible one of them"

But i want to do this in a clean way
Thanks in advance
Sep 4 '08 #1
3 2494
missinglinq
3,532 Expert 2GB
My guess is that you're trying to do this while the form is running, and this kind of design change can only be made if the form is opened in Design View.

Linq ;0)>
Sep 4 '08 #2
NeoPa
32,556 Expert Mod 16PB
Cleanliness and neatness of code is always very important IMHO.

In this case, if I understand your requirements correctly, keeping (and managing) the TextBox as separate from the ComboBox seems a neater solution to me. I assume you don't want simply to disable the ComboBox on the fly. That would disable the ComboBox facility while at the same time show the selected result. Unfortunately it's also somewhat greyed out, so half hidden. Not an ideal solution.
Sep 5 '08 #3
missinglinq
3,532 Expert 2GB
What exactly are you trying to accomplish with this?

Linq ;0)>
Sep 5 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
3
by: TT (Tom Tempelaere) | last post by:
Hay there, I'm writing my own DataGridComboBoxColumn because .NET 1.1 does not have one (I hope .NET 2.0 supplies one). I based it on this article:...
0
by: Ken Arway | last post by:
Using .Net framework 1.1 I've got a Windows Forms application with a tab control having four tab pages. TabPage4 contains a Combobox and a TextBox, which are bound to the same XML file as a...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
0
by: zhuang | last post by:
Hi, Adding combobox to datagrid has been posted many times. I have a datagrid which has multiple combobox columns and normal textbox columns. But how could I change other combo box values at...
1
by: polocar | last post by:
Ciao a tutti, leggendo qua e lŕ per il forum ho scoperto che non sono l'unico ad avere questo problema. Se si inserisce un controllo ComboBox in un form di C#, non č possibile impostare la sua...
0
by: joinzulfi | last post by:
Dear fellows! I have designed a form having SaleMasterTable and SaleDetailTable. SaleDetailTable is Bounded with DataGrid. Now I want that if in2nd Column's cell (it is combobox) value is...
2
by: DesCF | last post by:
I have a textbox and a combobox on a toolstrip. The user enters either an ID in the textbox or selects a name from the combobox. When the user selects a name from the combobox the textbox is...
8
by: shruthiKKKK | last post by:
change appearence for textbox by using combolist
1
by: billypit | last post by:
Hi, I am totaly new to MS Access. I have one form in MS Access in which i want that whenever i select an item from combobox then in the textbox on the same form or subform i want value from table...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.