I have data that has things like "St. John's" that were entered and then saved to access database. When I use access query the data displays fine, however when I use the code I sent to populate a combobox, the period triggers a shift in the data so the combobox that has 2 columns would display column 1 "St" then column 2 would have "John" then column 1 next row would have "s" and then column 2 2nd row would have "141" which is a record ID. If I were to put a ms access query in the recordsource it works fine but when I write a sql statement to populate the box I get these weird displays. I can't use an access query as the record source as it needs to change. Please help fast!
'This populates the combo with the table data and the NEW item.
Me.CbxCmpnyTypNm.RowSource = ""
'This add the New Item
Me.CbxCmpnyTypNm.AddItem ("0;<New Record>")
'This sets some initial values to work with
Dim db As Object
Dim rcrdst As Object
Dim strCmpnyID As String
Set db = CurrentDb
'This tells the system if you get an error go there.
On Error GoTo Error_Handler
'This gets the records from the database.
Set rcrdst = db.OpenRecordset("SELECT tblCmpnyTyp.CmpnyTypID, tblCmpnyTyp.CmpnyTypNm, tblCmpnyTyp.StatID, tblStat.StatNm " & _
"FROM tblStat INNER JOIN tblCmpnyTyp ON tblStat.StatID = tblCmpnyTyp.StatID " & _
"WHERE tblCmpnyTyp.StatID = 1 " & _
"ORDER BY tblCmpnyTyp.CmpnyTypNm")
'This loops thru to add items from the table
Do Until rcrdst.EOF
Me.CbxCmpnyTypNm.AddItem (rcrdst.Fields("CmpnyTypID") & ";" & rcrdst.Fields("CmpnyTypNm"))