A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Creating a Drop down list where can pick more than one choice



 
 
Thread Tools Display Modes
  #1  
Old April 17th, 2009, 04:40 PM posted to microsoft.public.access.forms
Jessica
external usenet poster
 
Posts: 299
Default Creating a Drop down list where can pick more than one choice

I would like to creat a dropdown list in which i can select more then one
option and have the options i selected display in a comment of box or text
box. The dropdown list will be a command button and when i click on it it
will display my dropdown list. I wish i can send and attachment of what i
need.
  #2  
Old April 17th, 2009, 04:58 PM posted to microsoft.public.access.forms
Ken Snell MVP
external usenet poster
 
Posts: 275
Default Creating a Drop down list where can pick more than one choice

A combobox will not let you select more than one option. However, you can
have your choices be added to a textbox's string value as you make them:

Private Sub NameOfYourComboBox_AfterUpdate()
Me.NameOfTextbox.Value = (Me.NameOfTextbox.Value & vbNullString) & _
(Me.NameOfYourComboBox.Value & vbNullString)
End Sub


You'll need to ensure that your textbox is empty when you start. You can do
that manually or you can use a command button to empty the textbox:

Private Sub NameOfYourCommandButton_Click()
Me.NameOfTextbox.Value = Null
End Sub

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/



"Jessica" wrote in message
...
I would like to creat a dropdown list in which i can select more then one
option and have the options i selected display in a comment of box or text
box. The dropdown list will be a command button and when i click on it it
will display my dropdown list. I wish i can send and attachment of what i
need.



  #3  
Old April 17th, 2009, 05:00 PM posted to microsoft.public.access.forms
Arvin Meyer MVP
external usenet poster
 
Posts: 640
Default Creating a Drop down list where can pick more than one choice

That is not what a combobox does. You can however use a Listbox. Set the
multi-select property to either simple or extended.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Jessica" wrote in message
...
I would like to creat a dropdown list in which i can select more then one
option and have the options i selected display in a comment of box or text
box. The dropdown list will be a command button and when i click on it it
will display my dropdown list. I wish i can send and attachment of what i
need.



  #4  
Old April 17th, 2009, 08:26 PM posted to microsoft.public.access.forms
Jessica
external usenet poster
 
Posts: 299
Default Creating a Drop down list where can pick more than one choice

I need more clarification i need to create a combo box and a text box. For
example the name of my combo box is Diagnostic and the text box is call
description how will the formula look.

"Ken Snell MVP" wrote:

A combobox will not let you select more than one option. However, you can
have your choices be added to a textbox's string value as you make them:

Private Sub NameOfYourComboBox_AfterUpdate()
Me.NameOfTextbox.Value = (Me.NameOfTextbox.Value & vbNullString) & _
(Me.NameOfYourComboBox.Value & vbNullString)
End Sub


You'll need to ensure that your textbox is empty when you start. You can do
that manually or you can use a command button to empty the textbox:

Private Sub NameOfYourCommandButton_Click()
Me.NameOfTextbox.Value = Null
End Sub

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/



"Jessica" wrote in message
...
I would like to creat a dropdown list in which i can select more then one
option and have the options i selected display in a comment of box or text
box. The dropdown list will be a command button and when i click on it it
will display my dropdown list. I wish i can send and attachment of what i
need.




  #5  
Old April 17th, 2009, 08:30 PM posted to microsoft.public.access.forms
Jessica
external usenet poster
 
Posts: 299
Default Creating a Drop down list where can pick more than one choice

where will the description go under the text box or combobox

"Ken Snell MVP" wrote:

A combobox will not let you select more than one option. However, you can
have your choices be added to a textbox's string value as you make them:

Private Sub NameOfYourComboBox_AfterUpdate()
Me.NameOfTextbox.Value = (Me.NameOfTextbox.Value & vbNullString) & _
(Me.NameOfYourComboBox.Value & vbNullString)
End Sub


You'll need to ensure that your textbox is empty when you start. You can do
that manually or you can use a command button to empty the textbox:

Private Sub NameOfYourCommandButton_Click()
Me.NameOfTextbox.Value = Null
End Sub

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/



"Jessica" wrote in message
...
I would like to creat a dropdown list in which i can select more then one
option and have the options i selected display in a comment of box or text
box. The dropdown list will be a command button and when i click on it it
will display my dropdown list. I wish i can send and attachment of what i
need.




  #6  
Old April 17th, 2009, 10:26 PM posted to microsoft.public.access.forms
Jessica
external usenet poster
 
Posts: 299
Default Creating a Drop down list where can pick more than one choice

It worked, but can i change the view of the combo box. Is there any way to
make it a link? I would like to be able to just click on the link to see my
choices select them and have them enter in my text box.

"Ken Snell MVP" wrote:

A combobox will not let you select more than one option. However, you can
have your choices be added to a textbox's string value as you make them:

Private Sub NameOfYourComboBox_AfterUpdate()
Me.NameOfTextbox.Value = (Me.NameOfTextbox.Value & vbNullString) & _
(Me.NameOfYourComboBox.Value & vbNullString)
End Sub


You'll need to ensure that your textbox is empty when you start. You can do
that manually or you can use a command button to empty the textbox:

Private Sub NameOfYourCommandButton_Click()
Me.NameOfTextbox.Value = Null
End Sub

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/



"Jessica" wrote in message
...
I would like to creat a dropdown list in which i can select more then one
option and have the options i selected display in a comment of box or text
box. The dropdown list will be a command button and when i click on it it
will display my dropdown list. I wish i can send and attachment of what i
need.




  #7  
Old April 17th, 2009, 11:52 PM posted to microsoft.public.access.forms
Ken Snell MVP
external usenet poster
 
Posts: 275
Default Creating a Drop down list where can pick more than one choice

I don't understand what you mean by "a link". If you want to select all
items and then have them show up in a text box, you'll need to use a listbox
(as suggested by Arvin. You then will need code to "read" all the selections
in the listbox and put them in the text box. Post back if you want to use
this setup and need help with the code.

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"Jessica" wrote in message
...
It worked, but can i change the view of the combo box. Is there any way to
make it a link? I would like to be able to just click on the link to see
my
choices select them and have them enter in my text box.

"Ken Snell MVP" wrote:

A combobox will not let you select more than one option. However, you can
have your choices be added to a textbox's string value as you make them:

Private Sub NameOfYourComboBox_AfterUpdate()
Me.NameOfTextbox.Value = (Me.NameOfTextbox.Value & vbNullString) & _
(Me.NameOfYourComboBox.Value & vbNullString)
End Sub


You'll need to ensure that your textbox is empty when you start. You can
do
that manually or you can use a command button to empty the textbox:

Private Sub NameOfYourCommandButton_Click()
Me.NameOfTextbox.Value = Null
End Sub

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/



"Jessica" wrote in message
...
I would like to creat a dropdown list in which i can select more then
one
option and have the options i selected display in a comment of box or
text
box. The dropdown list will be a command button and when i click on it
it
will display my dropdown list. I wish i can send and attachment of what
i
need.






  #8  
Old April 18th, 2009, 12:08 AM posted to microsoft.public.access.forms
Jessica
external usenet poster
 
Posts: 299
Default Creating a Drop down list where can pick more than one choice

your first suggestion worked, the problem was that in the form view both the
combo box and text box were display. i would like is to have a select button
that would display my list box then when the selection is made in the list
box it would transfer to the text box. If that is not possible send me the
code for the below

"Ken Snell MVP" wrote:

I don't understand what you mean by "a link". If you want to select all
items and then have them show up in a text box, you'll need to use a listbox
(as suggested by Arvin. You then will need code to "read" all the selections
in the listbox and put them in the text box. Post back if you want to use
this setup and need help with the code.

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"Jessica" wrote in message
...
It worked, but can i change the view of the combo box. Is there any way to
make it a link? I would like to be able to just click on the link to see
my
choices select them and have them enter in my text box.

"Ken Snell MVP" wrote:

A combobox will not let you select more than one option. However, you can
have your choices be added to a textbox's string value as you make them:

Private Sub NameOfYourComboBox_AfterUpdate()
Me.NameOfTextbox.Value = (Me.NameOfTextbox.Value & vbNullString) & _
(Me.NameOfYourComboBox.Value & vbNullString)
End Sub


You'll need to ensure that your textbox is empty when you start. You can
do
that manually or you can use a command button to empty the textbox:

Private Sub NameOfYourCommandButton_Click()
Me.NameOfTextbox.Value = Null
End Sub

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/



"Jessica" wrote in message
...
I would like to creat a dropdown list in which i can select more then
one
option and have the options i selected display in a comment of box or
text
box. The dropdown list will be a command button and when i click on it
it
will display my dropdown list. I wish i can send and attachment of what
i
need.






  #9  
Old April 18th, 2009, 04:19 PM posted to microsoft.public.access.forms
Ken Snell MVP
external usenet poster
 
Posts: 275
Default Creating a Drop down list where can pick more than one choice

To use a command button to make your combobox visible for selecting an item,
then to have it become invisible after you make the selection:

Private Sub CommandButtonName_Click()
Me.NameOfYourComboBox.Visible = True
Me.NameOfYourComboBox.SetFocus
Me.NameOfYourComboBox.Dropdown
End Sub

Private Sub NameOfYourComboBox_AfterUpdate()
Me.NameOfTextbox.Value = (Me.NameOfTextbox.Value & vbNullString) & _
(Me.NameOfYourComboBox.Value & vbNullString)
Me.CommandButtonName.SetFocus
Me.NameOfYourComboBox.Visible = False
End Sub

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"Jessica" wrote in message
...
your first suggestion worked, the problem was that in the form view both
the
combo box and text box were display. i would like is to have a select
button
that would display my list box then when the selection is made in the
list
box it would transfer to the text box. If that is not possible send me
the
code for the below

"Ken Snell MVP" wrote:

I don't understand what you mean by "a link". If you want to select all
items and then have them show up in a text box, you'll need to use a
listbox
(as suggested by Arvin. You then will need code to "read" all the
selections
in the listbox and put them in the text box. Post back if you want to
use
this setup and need help with the code.

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"Jessica" wrote in message
...
It worked, but can i change the view of the combo box. Is there any way
to
make it a link? I would like to be able to just click on the link to
see
my
choices select them and have them enter in my text box.

"Ken Snell MVP" wrote:

A combobox will not let you select more than one option. However, you
can
have your choices be added to a textbox's string value as you make
them:

Private Sub NameOfYourComboBox_AfterUpdate()
Me.NameOfTextbox.Value = (Me.NameOfTextbox.Value & vbNullString) & _
(Me.NameOfYourComboBox.Value & vbNullString)
End Sub


You'll need to ensure that your textbox is empty when you start. You
can
do
that manually or you can use a command button to empty the textbox:

Private Sub NameOfYourCommandButton_Click()
Me.NameOfTextbox.Value = Null
End Sub

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/



"Jessica" wrote in message
...
I would like to creat a dropdown list in which i can select more then
one
option and have the options i selected display in a comment of box
or
text
box. The dropdown list will be a command button and when i click on
it
it
will display my dropdown list. I wish i can send and attachment of
what
i
need.








  #10  
Old April 18th, 2009, 10:02 PM posted to microsoft.public.access.forms
Jessica
external usenet poster
 
Posts: 299
Default Creating a Drop down list where can pick more than one choice

It worked perfectly, but i"m having a little problem when i run a query on a
specific
Diagnosis from the text box. is not showing me any records. I though that by
putting a comma after each diagnosis i pick from the combo box into the text
box i could run a query on a specific one but is not working.

"Ken Snell MVP" wrote:

To use a command button to make your combobox visible for selecting an item,
then to have it become invisible after you make the selection:

Private Sub CommandButtonName_Click()
Me.NameOfYourComboBox.Visible = True
Me.NameOfYourComboBox.SetFocus
Me.NameOfYourComboBox.Dropdown
End Sub

Private Sub NameOfYourComboBox_AfterUpdate()
Me.NameOfTextbox.Value = (Me.NameOfTextbox.Value & vbNullString) & _
(Me.NameOfYourComboBox.Value & vbNullString)
Me.CommandButtonName.SetFocus
Me.NameOfYourComboBox.Visible = False
End Sub

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"Jessica" wrote in message
...
your first suggestion worked, the problem was that in the form view both
the
combo box and text box were display. i would like is to have a select
button
that would display my list box then when the selection is made in the
list
box it would transfer to the text box. If that is not possible send me
the
code for the below

"Ken Snell MVP" wrote:

I don't understand what you mean by "a link". If you want to select all
items and then have them show up in a text box, you'll need to use a
listbox
(as suggested by Arvin. You then will need code to "read" all the
selections
in the listbox and put them in the text box. Post back if you want to
use
this setup and need help with the code.

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"Jessica" wrote in message
...
It worked, but can i change the view of the combo box. Is there any way
to
make it a link? I would like to be able to just click on the link to
see
my
choices select them and have them enter in my text box.

"Ken Snell MVP" wrote:

A combobox will not let you select more than one option. However, you
can
have your choices be added to a textbox's string value as you make
them:

Private Sub NameOfYourComboBox_AfterUpdate()
Me.NameOfTextbox.Value = (Me.NameOfTextbox.Value & vbNullString) & _
(Me.NameOfYourComboBox.Value & vbNullString)
End Sub


You'll need to ensure that your textbox is empty when you start. You
can
do
that manually or you can use a command button to empty the textbox:

Private Sub NameOfYourCommandButton_Click()
Me.NameOfTextbox.Value = Null
End Sub

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/



"Jessica" wrote in message
...
I would like to creat a dropdown list in which i can select more then
one
option and have the options i selected display in a comment of box
or
text
box. The dropdown list will be a command button and when i click on
it
it
will display my dropdown list. I wish i can send and attachment of
what
i
need.









 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.