Hi - I have a form that has parent and child records - the child records that match the parent record are added to a combo box with .additem
This works well as a user can select from the combo and I save the value of the combo to the table - however when it comes to veiwing that record I am struggling with the methodology of linking the data to the combo... obviously cmb(0).text = trim(rs!field) would be ideal!!!
My efforts to solve this have include this idea that doesn't work but you will get my thinking on it - even if it did wotk i think it would be slow if there were many items in the combo...
If IsNull(rsYG!yg_clubname) Then
'cmb(0).ListIndex = 0
Else
For intLoop = 0 To cmb(0).ListCount
If cmb(0).List(intLoop) = Trim(rsYG!yg_clubname) Then
intIndex = cmb(0).ListIndex
Exit For
End If
Next
End If
I am trying to obtain the listindex then do: cmb(0).listindex = ?
There must be a better way!
Any help appreciated!
Chris