UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Adding To Listbox From Combo Box & Text Box, Office 2007    
 
   
christo1984
post Jan 15 2011, 10:19 PM
Post #1

New Member
Posts: 1



i am creating a list box that gets data added from a text box and also a combo box.
The list box has 4 columns, 1 for the singer, 1 for song, 1 for track number and 1 for cd id.
I am able to add the details for the song in each column however i can only get 1 column from the combo box (where the song name, cd id and track number come from) into the list. How can i set it up so that it brings the data for the item selected in the combo box across correctly.

I have a command button that after text is entered and the item from the combo box is selected the following code is used:


CODE
Private Sub Command28_Click()

PlaylistRotation.AddItem Singer & ";" & song & ";" & song & ";" & song

End Sub


This post has been edited by christo1984: Jan 15 2011, 10:29 PM
Go to the top of the page
 
+
Larry Larsen
post Jan 16 2011, 05:47 AM
Post #2

UA Editor + Utterly Certified
Posts: 22,722
From: Melton Mowbray,Leicestershire (U.K)



Hi
(IMG:style_emoticons/default/welcome2UA.gif)

May be if you make reference to the actual column of the combo..:
eg:

CODE
Private Sub Command28_Click()

strSong = Me.ComboName.Column(1)
strCdID =  Me.ComboName.Column(2)
strTrack =  Me.ComboName.Column(3)

PlaylistRotation.AddItem Singer & ";" & strSong & ";" & strCdID & ";" & strTrack

End Sub


Im making reference to columns 1,2,3 you may have different values...

Note column references start at (0)..

HTH's
(IMG:style_emoticons/default/thumbup.gif)
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 24th May 2013 - 12:22 AM