Hi,
Each time the user selects an item from a combobox, I want that string to
get appended to the values that were already selected. The result is that
the combo is accumulating text each time the user selects an item from its
list. I want the delete and backspace keys to function normally, as well
as all the other properties of the combobox.
Does anybody know the easiest way to do this?
Thanks!
Norm 14 2098
On Sun, 19 Sep 2004 16:22:11 -0500, Norm wrote: Hi,
Each time the user selects an item from a combobox, I want that string to get appended to the values that were already selected. The result is that the combo is accumulating text each time the user selects an item from its list. I want the delete and backspace keys to function normally, as well as all the other properties of the combobox.
Does anybody know the easiest way to do this?
Thanks! Norm
Code the Combo Box AfterUpdate event:
[ControlName] = [ControlName] & Me![ComboName]
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
fredg <fg******@example.invalid> wrote in
news:1f****************************@40tude.net: On Sun, 19 Sep 2004 16:22:11 -0500, Norm wrote:
Hi,
Each time the user selects an item from a combobox, I want that string to get appended to the values that were already selected. The result is that the combo is accumulating text each time the user selects an item from its list. I want the delete and backspace keys to function normally, as well as all the other properties of the combobox.
Does anybody know the easiest way to do this?
Thanks! Norm
Code the Combo Box AfterUpdate event: [ControlName] = [ControlName] & Me![ComboName]
Hi Fred,
Thanks for the reply, but that's not quite right. [ControlName] and Me!
[ComboName] both contain the new value selected by the user. The result
is that the old value gets lost and the combo becomes equal to the new
value string & the new value string.
Norm
On Sun, 19 Sep 2004 17:26:05 -0500, Norm wrote: fredg <fg******@example.invalid> wrote in news:1f****************************@40tude.net:
On Sun, 19 Sep 2004 16:22:11 -0500, Norm wrote:
Hi,
Each time the user selects an item from a combobox, I want that string to get appended to the values that were already selected. The result is that the combo is accumulating text each time the user selects an item from its list. I want the delete and backspace keys to function normally, as well as all the other properties of the combobox.
Does anybody know the easiest way to do this?
Thanks! Norm
Code the Combo Box AfterUpdate event: [ControlName] = [ControlName] & Me![ComboName]
Hi Fred,
Thanks for the reply, but that's not quite right. [ControlName] and Me! [ComboName] both contain the new value selected by the user. The result is that the old value gets lost and the combo becomes equal to the new value string & the new value string.
Norm
You are not correct in your statement.
Perhaps you should try it first, or perhaps you tried it but you did
not write the expression properly.
[ControlName] = [ControlName] & Me![ComboName]
If you select 3 items, one at a time, from a combo box, the result in
the text box will be the 3 items, one after the other.
Select Yes, then Maybe, then No, and the text box will read
YesMaybeNo.
If you incorrectly wrote:
[ControlName] = Me!ComboName
then you would see only the last item selected.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
fredg <fg******@example.invalid> wrote in
news:1c*****************************@40tude.net: On Sun, 19 Sep 2004 17:26:05 -0500, Norm wrote:
fredg <fg******@example.invalid> wrote in news:1f****************************@40tude.net:
On Sun, 19 Sep 2004 16:22:11 -0500, Norm wrote:
Hi,
Each time the user selects an item from a combobox, I want that string to get appended to the values that were already selected. The result is that the combo is accumulating text each time the user selects an item from its list. I want the delete and backspace keys to function normally, as well as all the other properties of the combobox.
Does anybody know the easiest way to do this?
Thanks! Norm
Code the Combo Box AfterUpdate event: [ControlName] = [ControlName] & Me![ComboName]
Hi Fred,
Thanks for the reply, but that's not quite right. [ControlName] and Me! [ComboName] both contain the new value selected by the user. The result is that the old value gets lost and the combo becomes equal to the new value string & the new value string.
Norm
You are not correct in your statement.
Perhaps you should try it first, or perhaps you tried it but you did not write the expression properly. [ControlName] = [ControlName] & Me![ComboName] If you select 3 items, one at a time, from a combo box, the result in the text box will be the 3 items, one after the other. Select Yes, then Maybe, then No, and the text box will read YesMaybeNo.
If you incorrectly wrote: [ControlName] = Me!ComboName then you would see only the last item selected.
Thanks again for your reply.
I think the problem is that I didn't fully explain what I'm trying to
do. I want to update the selected text in the combo with the
accumulated values. So...[ControlName] = [ComboName]. Using your
expression, it would be [ComboName] = [ComboName] & Me![ComboName].
I did try your expression and I'm not getting the correct result.
Any other ideas?
Norm
On Sun, 19 Sep 2004 20:45:10 -0500, Norm wrote: fredg <fg******@example.invalid> wrote in news:1c*****************************@40tude.net:
On Sun, 19 Sep 2004 17:26:05 -0500, Norm wrote:
fredg <fg******@example.invalid> wrote in news:1f****************************@40tude.net:
On Sun, 19 Sep 2004 16:22:11 -0500, Norm wrote:
> Hi, > > Each time the user selects an item from a combobox, I want that > string to get appended to the values that were already selected. > The result is that the combo is accumulating text each time the > user selects an item from its list. I want the delete and > backspace keys to function normally, as well as all the other > properties of the combobox. > > Does anybody know the easiest way to do this? > > Thanks! > Norm
Code the Combo Box AfterUpdate event: [ControlName] = [ControlName] & Me![ComboName]
Hi Fred,
Thanks for the reply, but that's not quite right. [ControlName] and Me! [ComboName] both contain the new value selected by the user. The result is that the old value gets lost and the combo becomes equal to the new value string & the new value string.
Norm
You are not correct in your statement.
Perhaps you should try it first, or perhaps you tried it but you did not write the expression properly. [ControlName] = [ControlName] & Me![ComboName] If you select 3 items, one at a time, from a combo box, the result in the text box will be the 3 items, one after the other. Select Yes, then Maybe, then No, and the text box will read YesMaybeNo.
If you incorrectly wrote: [ControlName] = Me!ComboName then you would see only the last item selected.
Thanks again for your reply.
I think the problem is that I didn't fully explain what I'm trying to do. I want to update the selected text in the combo with the accumulated values. So...[ControlName] = [ComboName]. Using your expression, it would be [ComboName] = [ComboName] & Me![ComboName].
I did try your expression and I'm not getting the correct result.
Any other ideas?
Norm
You're correct. I did misread your request, and thought you wanted to
add text to a control,(a common procedure) based upon selections in
the combo box.
It seems like a rather strange request and makes no sense to me.
You already have a at least one value in the combo (let's say "Joe)
that you select, and you want to change the value in the combo to
"JoeJoe"?
And then what? "JoeJoeJoeJoe".
The usual purpose of a combo is to select a value and insert into a
control or field not into itself.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
fredg <fg******@example.invalid> wrote in
news:16*****************************@40tude.net: On Sun, 19 Sep 2004 20:45:10 -0500, Norm wrote:
fredg <fg******@example.invalid> wrote in news:1c*****************************@40tude.net:
On Sun, 19 Sep 2004 17:26:05 -0500, Norm wrote:
fredg <fg******@example.invalid> wrote in news:1f****************************@40tude.net:
> On Sun, 19 Sep 2004 16:22:11 -0500, Norm wrote: > >> Hi, >> >> Each time the user selects an item from a combobox, I want that >> string to get appended to the values that were already selected. >> The result is that the combo is accumulating text each time the >> user selects an item from its list. I want the delete and >> backspace keys to function normally, as well as all the other >> properties of the combobox. >> >> Does anybody know the easiest way to do this? >> >> Thanks! >> Norm > > Code the Combo Box AfterUpdate event: > [ControlName] = [ControlName] & Me![ComboName]
Hi Fred,
Thanks for the reply, but that's not quite right. [ControlName] and Me! [ComboName] both contain the new value selected by the user. The result is that the old value gets lost and the combo becomes equal to the new value string & the new value string.
Norm
You are not correct in your statement.
Perhaps you should try it first, or perhaps you tried it but you did not write the expression properly. [ControlName] = [ControlName] & Me![ComboName] If you select 3 items, one at a time, from a combo box, the result in the text box will be the 3 items, one after the other. Select Yes, then Maybe, then No, and the text box will read YesMaybeNo.
If you incorrectly wrote: [ControlName] = Me!ComboName then you would see only the last item selected.
Thanks again for your reply.
I think the problem is that I didn't fully explain what I'm trying to do. I want to update the selected text in the combo with the accumulated values. So...[ControlName] = [ComboName]. Using your expression, it would be [ComboName] = [ComboName] & Me![ComboName].
I did try your expression and I'm not getting the correct result.
Any other ideas?
Norm
You're correct. I did misread your request, and thought you wanted to add text to a control,(a common procedure) based upon selections in the combo box.
It seems like a rather strange request and makes no sense to me. You already have a at least one value in the combo (let's say "Joe) that you select, and you want to change the value in the combo to "JoeJoe"? And then what? "JoeJoeJoeJoe". The usual purpose of a combo is to select a value and insert into a control or field not into itself.
Yes, that is exactly what I want to do. The reason is that the user is
selecting multiple items from the combo, and all of their selections
need to be captured in this string. I don't have the space to use
checkboxes or radio buttons to select these items, and have many combos
on the form. By selecting multiple items in the combo and concatenating
them into one string, the user can assemble whatever string they desire
into the combo. Unfortunately, I believe this is really the way I need
to do it.
Any ideas on how?
Norm
Norm <od*****@comcast.net> wrote in
news:Xn******************************@216.196.97.1 36: fredg <fg******@example.invalid> wrote in news:16*****************************@40tude.net:
On Sun, 19 Sep 2004 20:45:10 -0500, Norm wrote:
fredg <fg******@example.invalid> wrote in news:1c*****************************@40tude.net:
On Sun, 19 Sep 2004 17:26:05 -0500, Norm wrote:
> fredg <fg******@example.invalid> wrote in > news:1f****************************@40tude.net: > >> On Sun, 19 Sep 2004 16:22:11 -0500, Norm wrote: >> >>> Hi, >>> >>> Each time the user selects an item from a combobox, I want that >>> string to get appended to the values that were already selected. >>> The result is that the combo is accumulating text each time the >>> user selects an item from its list. I want the delete and >>> backspace keys to function normally, as well as all the other >>> properties of the combobox. >>> >>> Does anybody know the easiest way to do this? >>> >>> Thanks! >>> Norm >> >> Code the Combo Box AfterUpdate event: >> [ControlName] = [ControlName] & Me![ComboName] > > Hi Fred, > > Thanks for the reply, but that's not quite right. [ControlName] > and Me! [ComboName] both contain the new value selected by the > user. The result is that the old value gets lost and the combo > becomes equal to the new value string & the new value string. > > Norm
You are not correct in your statement.
Perhaps you should try it first, or perhaps you tried it but you did not write the expression properly. [ControlName] = [ControlName] & Me![ComboName] If you select 3 items, one at a time, from a combo box, the result in the text box will be the 3 items, one after the other. Select Yes, then Maybe, then No, and the text box will read YesMaybeNo.
If you incorrectly wrote: [ControlName] = Me!ComboName then you would see only the last item selected.
Thanks again for your reply.
I think the problem is that I didn't fully explain what I'm trying to do. I want to update the selected text in the combo with the accumulated values. So...[ControlName] = [ComboName]. Using your expression, it would be [ComboName] = [ComboName] & Me![ComboName].
I did try your expression and I'm not getting the correct result.
Any other ideas?
Norm
You're correct. I did misread your request, and thought you wanted to add text to a control,(a common procedure) based upon selections in the combo box.
It seems like a rather strange request and makes no sense to me. You already have a at least one value in the combo (let's say "Joe) that you select, and you want to change the value in the combo to "JoeJoe"? And then what? "JoeJoeJoeJoe". The usual purpose of a combo is to select a value and insert into a control or field not into itself.
Yes, that is exactly what I want to do. The reason is that the user is selecting multiple items from the combo, and all of their selections need to be captured in this string. I don't have the space to use checkboxes or radio buttons to select these items, and have many combos on the form. By selecting multiple items in the combo and concatenating them into one string, the user can assemble whatever string they desire into the combo. Unfortunately, I believe this is really the way I need to do it.
Any ideas on how?
Norm
Fred,
Based on your original suggestion to me, I think I solved the problem.
Thanks for taking the time to reply which enabled me to discover the
solution! Norm
Try this on the after update.
Me.YourField = Me.YourField & Me.ComboBox
Norm <od*****@comcast.net> wrote in message news:<Xn*******************************@216.196.97 .136>... Norm <od*****@comcast.net> wrote in news:Xn******************************@216.196.97.1 36:
fredg <fg******@example.invalid> wrote in news:16*****************************@40tude.net:
On Sun, 19 Sep 2004 20:45:10 -0500, Norm wrote:
fredg <fg******@example.invalid> wrote in news:1c*****************************@40tude.net:
> On Sun, 19 Sep 2004 17:26:05 -0500, Norm wrote: > >> fredg <fg******@example.invalid> wrote in >> news:1f****************************@40tude.net: >> >>> On Sun, 19 Sep 2004 16:22:11 -0500, Norm wrote: >>> >>>> Hi, >>>> >>>> Each time the user selects an item from a combobox, I want that >>>> string to get appended to the values that were already selected. >>>> The result is that the combo is accumulating text each time the >>>> user selects an item from its list. I want the delete and >>>> backspace keys to function normally, as well as all the other >>>> properties of the combobox. >>>> >>>> Does anybody know the easiest way to do this? >>>> >>>> Thanks! >>>> Norm >>> >>> Code the Combo Box AfterUpdate event: >>> [ControlName] = [ControlName] & Me![ComboName] >> >> Hi Fred, >> >> Thanks for the reply, but that's not quite right. [ControlName] >> and Me! [ComboName] both contain the new value selected by the >> user. The result is that the old value gets lost and the combo >> becomes equal to the new value string & the new value string. >> >> Norm > > You are not correct in your statement. > > Perhaps you should try it first, or perhaps you tried it but you > did not write the expression properly. > [ControlName] = [ControlName] & Me![ComboName] > If you select 3 items, one at a time, from a combo box, the result > in the text box will be the 3 items, one after the other. > Select Yes, then Maybe, then No, and the text box will read > YesMaybeNo. > > If you incorrectly wrote: > [ControlName] = Me!ComboName > then you would see only the last item selected. >
Thanks again for your reply.
I think the problem is that I didn't fully explain what I'm trying to do. I want to update the selected text in the combo with the accumulated values. So...[ControlName] = [ComboName]. Using your expression, it would be [ComboName] = [ComboName] & Me![ComboName].
I did try your expression and I'm not getting the correct result.
Any other ideas?
Norm
You're correct. I did misread your request, and thought you wanted to add text to a control,(a common procedure) based upon selections in the combo box.
It seems like a rather strange request and makes no sense to me. You already have a at least one value in the combo (let's say "Joe) that you select, and you want to change the value in the combo to "JoeJoe"? And then what? "JoeJoeJoeJoe". The usual purpose of a combo is to select a value and insert into a control or field not into itself.
Yes, that is exactly what I want to do. The reason is that the user is selecting multiple items from the combo, and all of their selections need to be captured in this string. I don't have the space to use checkboxes or radio buttons to select these items, and have many combos on the form. By selecting multiple items in the combo and concatenating them into one string, the user can assemble whatever string they desire into the combo. Unfortunately, I believe this is really the way I need to do it.
Any ideas on how?
Norm
Fred,
Based on your original suggestion to me, I think I solved the problem. Thanks for taking the time to reply which enabled me to discover the solution! Norm sl****@sbcglobal.net (Wes) wrote in
news:3e**************************@posting.google.c om: Try this on the after update.
Me.YourField = Me.YourField & Me.ComboBox
Since I am updating the combo itself, your expression would become:
Me.ComboBox = Me.ComboBox & Me.ComboBox
Am I understanding you correctly? That expression would not produce the
correct result.
Norm
"Norm" <od*****@comcast.net> wrote in message
news:Xn*******************************@216.196.97. 136... sl****@sbcglobal.net (Wes) wrote in news:3e**************************@posting.google.c om:
Try this on the after update.
Me.YourField = Me.YourField & Me.ComboBox
Since I am updating the combo itself, your expression would become:
Me.ComboBox = Me.ComboBox & Me.ComboBox
Am I understanding you correctly? That expression would not produce the correct result.
I fairly sure you'll have to use a separate control to accumulate the results.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Why not save yourself a whole lot of hassle and just use a
multi-select listbox? Comboboxes really are not built to do what you
want. MSLB's are. pi********@hotmail.com (Pieter Linden) wrote in
news:bf**************************@posting.google.c om: Why not save yourself a whole lot of hassle and just use a multi-select listbox? Comboboxes really are not built to do what you want. MSLB's are.
Great suggestion, however I have specific requirements which make the MSLB
not ideal. Each Combo/Listbox (there are over a dozen on each form) can
only be 2 characters in height to fit them all on the page and obviously
have a limited width. Scrolling through a listbox of 2 character height
only enables the user to see 1 item per line. It's much nicer with the
combo when they drop it down they can see all the choices but the control
still only takes up 2 lines in height.
Given the short height of the box, the look and feel is just better with a
Combo. Thanks for the idea though.
Norm
Ravichandran J.V. <jv************@yahoo.com> wrote in news:414ff977$0$26101
$c******@news.newsgroups.ws: Have you tried
comboBox1.Text&=comboBox1.SelectedItem.ToString()
?
with regards,
J.V.Ravichandran - http://www.geocities.com/ jvravichandran
I tried that expression but there were multiple errors and it didn't
execute. Thanks for the try.
Norm This discussion thread is closed Replies have been disabled for this discussion. Similar topics
reply
views
Thread by thomaz |
last post: by
|
2 posts
views
Thread by benjamin_r |
last post: by
|
3 posts
views
Thread by Mark P |
last post: by
|
4 posts
views
Thread by Keith |
last post: by
|
5 posts
views
Thread by cesco |
last post: by
|
4 posts
views
Thread by Vish |
last post: by
|
4 posts
views
Thread by Matt |
last post: by
|
5 posts
views
Thread by CCLeasing |
last post: by
|
7 posts
views
Thread by Henrique A. Menarin |
last post: by
| | | | | | | | | | |