Hello all,

i just started msaccess 2003 and have this problem with the listbox.
i'm trying to place a list of names on my listbox from a SQL database (server). but when i import names having a comma (,) on them, access place them on a different row... is there a way to solve this problem?
thanks...

for additional info, here is my code:

Private Sub Form_Open(Cancel As Integer)
Dim Conn As Variant
Dim strUserID As String
Dim strPassword As String
Dim str_Connstr As Variant
Dim temp As String
Dim rs1 As Object



On Error GoTo closeconn
Set Conn = CreateObject("ADODB.Connection")
strUserID = "XXXX"
strPassword = "XXXX"
str_Connstr = "Provider=sqloledb;Initial catalog=macdata;User ID=" & strUserID & ";Password=" & strPassword & ";Data Source= CEBUSQL;"
Conn.Open str_Connstr

On Error GoTo closeconn

Set rs1 = CreateObject("ADODB.recordset")


rs1.Open "Select * from personnel where empsts = '" & "R" & "' AND Company = '" & "COY" & "'", Conn


While Not rs1.EOF
temp = (rs1("LastName").Value) & ", " & (rs1("FirstName").Value) & " " & (rs1("MiddleName").Value)
'temp = rs1("Address").Value
Me.lstMasterlist.AddItem temp
rs1.MoveNext
Wend

MsgBox "Done"
Exit Sub

closeconn:
MsgBox Err.Description
rs1.Close
End Sub

thanks in advance..