By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,646 Members | 2,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,646 IT Pros & Developers. It's quick & easy.

Select multiple items in combobox, to display in textbox

P: 2
I am using MS Access (frontend), VB 6.0 (code) and SQL Server (DB) now. I have a combobox and textbox. I need to select multiple items from combobox which should be displayed in textbox. Items should be displayed line by line but not in the same line. Please help.

Here is the code which I have coded.
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmbpocomments_click()
  2.   If Len(txtcocomments.Value) > 0 Then
  3.     Dim a As String
  4.     a = txtcocomments.Value
  5.     txtcocomments.Value = a + "," + cmbpocomments.Value
  6.   Else
  7.     txtcocomments.Value = cmbpocomments.Value
  8.   End If
  9. End Sub
  10.  
Dec 18 '07 #1
Share this Question
Share on Google+
1 Reply


Expert 5K+
P: 8,434
If you want the items to appear on separate lines, just replace the comma in line 5 with the constant vbNewLine.

Um... does a textbox have a Value property?
Dec 19 '07 #2

Post your reply

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