I have something strange going on - pretty sure it used to work before - and
now it does not...
Why does the following code not clear a combo box?
Me.cboLocation.Text = String.Empty
OR
Me.cboLocation.Text = ""
Neither of the above works. The combo box contents remain exactly the same
after running that command...
Help!
Thanks, Brad 7 3525
On May 7, 1:17*pm, "Brad Pears" <br...@truenorthloghomes.comwrote:
I have something strange going on - pretty sure it used to work before - and
now it does not...
Why does the following code not clear a combo box?
Me.cboLocation.Text = String.Empty
OR
Me.cboLocation.Text = ""
Neither of the above works. *The combo box contents remain exactly the same
after running that command...
Help!
Thanks, Brad
I think you will also need to set the .SelectedIndex property to -1.
At least, that works for me.
"Brad Pears" <br***@truenorthloghomes.comschrieb
I have something strange going on - pretty sure it used to work
before - and now it does not...
Why does the following code not clear a combo box?
Me.cboLocation.Text = String.Empty
OR
Me.cboLocation.Text = ""
Neither of the above works. The combo box contents remain exactly
the same after running that command...
What's the value of cboLocation.Dropdownstyle? If it's "DropDownList",
use cboLocation.SelectedIndex = -1
Armin
On May 7, 8:17 pm, "Brad Pears" <br...@truenorthloghomes.comwrote:
I have something strange going on - pretty sure it used to work before - and
now it does not...
Why does the following code not clear a combo box?
Me.cboLocation.Text = String.Empty
OR
Me.cboLocation.Text = ""
Neither of the above works. The combo box contents remain exactly the same
after running that command...
Help!
Thanks, Brad
Hi,
Using DropDownList style it doesn't clear combobox, Simple or DropDown
styles allow you to clear with the codes you've mentioned.
And if you want to clear current item of your combobox(current item,
because "clear" term may come to meaning of clearing entire combobox
which you did not intend to do), you can use
"Me.cboLocation.selectedindex = - 1" or add a empty item temporarily
using:
Me.cboLocation.Items.Add("")
Me.cboLocation.Text = ""
Me.cboLocation.Items.Remove("")
Hope these help,
Onur
Thanks for your reply's... That works perfect.... I had changed the type of
drop down and that is why my previous code no longer worked. I knew there
had to be an explanation somewhere!!!
Thanks, again, Brad
"Brad Pears" <br***@truenorthloghomes.comwrote in message
news:uK**************@TK2MSFTNGP02.phx.gbl...
>I have something strange going on - pretty sure it used to work before - and now it does not...
Why does the following code not clear a combo box?
Me.cboLocation.Text = String.Empty
OR
Me.cboLocation.Text = ""
Neither of the above works. The combo box contents remain exactly the
same after running that command...
Help!
Thanks, Brad
I am trying to set a combo box's text property to a value from a listview
item's text property as shown below... However, it appears that because the
combo box is defined as a "DropDownList", am I am now unable to assign a
text value that way? Do I now have to find out what position the listview
item's text value I want is in the list of combo items and then assign an
index value instead of an actual text value? (Wow, that was a mouthful!!!)
Me.cboLabel.Text = Me.lvwJobPosts.SelectedItems.Item(0).SubItems(2).T ext
Thanks, Brad
"kimiraikkonen" <ki*************@gmail.comwrote in message
news:60**********************************@m44g2000 hsc.googlegroups.com...
On May 7, 8:17 pm, "Brad Pears" <br...@truenorthloghomes.comwrote:
>I have something strange going on - pretty sure it used to work before - and now it does not...
Why does the following code not clear a combo box?
Me.cboLocation.Text = String.Empty
OR
Me.cboLocation.Text = ""
Neither of the above works. The combo box contents remain exactly the same after running that command...
Help!
Thanks, Brad
Hi,
Using DropDownList style it doesn't clear combobox, Simple or DropDown
styles allow you to clear with the codes you've mentioned.
And if you want to clear current item of your combobox(current item,
because "clear" term may come to meaning of clearing entire combobox
which you did not intend to do), you can use
"Me.cboLocation.selectedindex = - 1" or add a empty item temporarily
using:
Me.cboLocation.Items.Add("")
Me.cboLocation.Text = ""
Me.cboLocation.Items.Remove("")
Hope these help,
Onur
On May 7, 11:20 pm, "Brad Pears" <br...@truenorthloghomes.comwrote:
I am trying to set a combo box's text property to a value from a listview
item's text property as shown below... However, it appears that because the
combo box is defined as a "DropDownList", am I am now unable to assign a
text value that way? Do I now have to find out what position the listview
item's text value I want is in the list of combo items and then assign an
index value instead of an actual text value? (Wow, that was a mouthful!!!)
Me.cboLabel.Text = Me.lvwJobPosts.SelectedItems.Item(0).SubItems(2).T ext
Thanks, Brad
"kimiraikkonen" <kimiraikkone...@gmail.comwrote in message
news:60**********************************@m44g2000 hsc.googlegroups.com...
On May 7, 8:17 pm, "Brad Pears" <br...@truenorthloghomes.comwrote:
I have something strange going on - pretty sure it used to work before -
and
now it does not...
Why does the following code not clear a combo box?
Me.cboLocation.Text = String.Empty
OR
Me.cboLocation.Text = ""
Neither of the above works. The combo box contents remain exactly the
same
after running that command...
Help!
Thanks, Brad
Hi,
Using DropDownList style it doesn't clear combobox, Simple or DropDown
styles allow you to clear with the codes you've mentioned.
And if you want to clear current item of your combobox(current item,
because "clear" term may come to meaning of clearing entire combobox
which you did not intend to do), you can use
"Me.cboLocation.selectedindex = - 1" or add a empty item temporarily
using:
Me.cboLocation.Items.Add("")
Me.cboLocation.Text = ""
Me.cboLocation.Items.Remove("")
Hope these help,
Onur
Hi,
I really had difficulty to make out what you're trying to do, as a
little understanding, if you want to syncronize two values between a
listview's subitem and combobox, you can do it with the code that you
posted.
Me.cboLabel.Text =
Me.lvwJobPosts.SelectedItems.Item(0).SubItems(2).T ext
I think you're asking if you have to specify index of listview
subitem's and i think yes you have to. If you used listbox instead of
listview you could use listbox1.selecteditem to get items text
property without specifying index (position) name.
Thanks,
Onur Güzel
Thanks for the reply... Yes, actually the code that I posted was actually
working as I discovered later on through more debugging. There was a
different problem that was setting the listview item index to -1 so it
appeared that my code was not setting the value at all when in fact it was.
Thanks for your help.
Brad
"kimiraikkonen" <ki*************@gmail.comwrote in message
news:99**********************************@e53g2000 hsa.googlegroups.com...
On May 7, 11:20 pm, "Brad Pears" <br...@truenorthloghomes.comwrote:
I am trying to set a combo box's text property to a value from a listview
item's text property as shown below... However, it appears that because
the
combo box is defined as a "DropDownList", am I am now unable to assign a
text value that way? Do I now have to find out what position the listview
item's text value I want is in the list of combo items and then assign an
index value instead of an actual text value? (Wow, that was a mouthful!!!)
Me.cboLabel.Text = Me.lvwJobPosts.SelectedItems.Item(0).SubItems(2).T ext
Thanks, Brad
"kimiraikkonen" <kimiraikkone...@gmail.comwrote in message
news:60**********************************@m44g2000 hsc.googlegroups.com...
On May 7, 8:17 pm, "Brad Pears" <br...@truenorthloghomes.comwrote:
I have something strange going on - pretty sure it used to work
before -
and
now it does not...
Why does the following code not clear a combo box?
Me.cboLocation.Text = String.Empty
OR
Me.cboLocation.Text = ""
Neither of the above works. The combo box contents remain exactly the
same
after running that command...
Help!
Thanks, Brad
Hi,
Using DropDownList style it doesn't clear combobox, Simple or DropDown
styles allow you to clear with the codes you've mentioned.
And if you want to clear current item of your combobox(current item,
because "clear" term may come to meaning of clearing entire combobox
which you did not intend to do), you can use
"Me.cboLocation.selectedindex = - 1" or add a empty item temporarily
using:
Me.cboLocation.Items.Add("")
Me.cboLocation.Text = ""
Me.cboLocation.Items.Remove("")
Hope these help,
Onur
Hi,
I really had difficulty to make out what you're trying to do, as a
little understanding, if you want to syncronize two values between a
listview's subitem and combobox, you can do it with the code that you
posted.
Me.cboLabel.Text =
Me.lvwJobPosts.SelectedItems.Item(0).SubItems(2).T ext
I think you're asking if you have to specify index of listview
subitem's and i think yes you have to. If you used listbox instead of
listview you could use listbox1.selecteditem to get items text
property without specifying index (position) name.
Thanks,
Onur Güzel This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Newbee |
last post by:
Hola
I wanted to kno how to clear the current text that is displayed in my combobox
I am filling it with a query which is run against my database
I have tried this but it not work
...
|
by: Alex Wisnoski |
last post by:
I have an edit record form with several text boxes, combo boxes, and
check boxes. All of them are bound except for one combo box
(cboPositionData), which I use to search for a specific record. I...
|
by: Peter Bailey |
last post by:
I have a function courtesy of the newsgroup that clears the list box. I
would like to now set the listbox back to its initial state where you can
see the first item in the list. The same goes for a...
|
by: rmatteson |
last post by:
I am trying to figure out how to clear all items from a combobox
(Access 2002).
On my form, I have to comboboxes. Combobox 2 is populated with a set
of child data dependent on the parent data...
|
by: Shannan Casteel via AccessMonster.com |
last post by:
I have a table with information about different people...(i.e. Name, Address,
Phone, Fax, etc.). The table has been linked to Access. I have created a
combo box that uses this information. ...
|
by: ed |
last post by:
Hello-
i'm having some problems getting innerhtml to clear on mozilla, but it
works fine in ie. my page is setup such that i have a div:
<div id="otherModel"></div>
on a select from a...
|
by: Geoff |
last post by:
One of the entries in my subform is a field called . is
populated by selecting from its drop down combo box which holds different
text options
I need to clear session if an invalid entry...
|
by: Vayse |
last post by:
I have a databound form, frmClients. One of the field is a combo box,
comDepartment, which lets a user select a department for the Client.
But I can't figure out how to clear the box. That is,...
|
by: monikagovindaraj |
last post by:
sir,
I needed to clear the text boxvalue after refreshing the same page.
actually im my program,the text box will be filled by using ajax.the value wil be assigned depends upon the previous...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
| |