I have a H/PC 2000 and the data comes from a pocket Access file.
Could somebody please tell me why the index of my combo box doesn't match
the primary key of EntryID and creates a new index starting at 0.
I have similar code working on other combo boxes on the main form that seems
to work fine. The combo box is on a frame, would that make a difference?
My code is as follows:
' Fill in combo box for Staff Names
Set oRecordset = CreateObject("ADOCE.Recordset.3.1")
oRecordset.Source = "SELECT EntryID, Name FROM tblStaff ORDER BY Name;"
oRecordset.CursorType = adOpenForwardOnly
oRecordset.ActiveConnection = oConnection
Do While Not oRecordset.EOF
cboStaff.ItemData(cboStaff.NewIndex) = oRecordset.Fields("EntryID")
Set oRecordset = Nothing
Please let me know the solution to the problem or any possible reason for
it not to work.