Here's a quick example of my problem.
Here's how it should lookCode:(1) People's Lawyers (2) Frank's Lawfirm (3) Smith Smith Smith and Paul (4) ABC Law
The combobox is populated by code from a database, so it is set up as ValueList. What can I do to get around the issue of the listbox taking the comma and seperating the data? Heres my code for the AddItem routine.Code:(1) People's Lawyers (2) Frank's Lawfirm (3) Smith, Smith, Smith and Paul (4) ABC Law
vb Code:
Function PopulateOrganization() Dim db As Database Dim rstORG As DAO.Recordset Dim SQL Dim i As Long Set db = CurrentDb() SQL = "SELECT org_id, org_desc FROM ORGANIZATIONS ORDER BY org_desc ASC" Set rstORG = db.OpenRecordset(SQL) rstORG.MoveFirst rstORG.MoveNext i = 0 Do While i < cmbOrganization.ListCount cmbOrganization.RemoveItem (i) Loop rstORG.MoveFirst Do While Not rstORG.EOF cmbOrganization.AddItem "(" & rstORG!org_id & ") " & (Trim(rstORG!org_desc)) rstORG.MoveNext Loop End Function
Any ideas would be greatly appriciated! Thanks in advanced.
~Chris




Reply With Quote