Hi I am trying to load a list box with a Field and an Id
And need to later extract that ID.
Heres what I got so far
If Not objRec.EOF Then objRec.MoveFirst
Do While Not objRec.EOF
lstTitles.AddItem objRec!Job_Title
lstTitles.ItemData(lstTitles.NewIndex) = objRec!titleid
objRec.MoveNext
Loop
This adds the Job Title and TitleID as index I assume?
What I need to do is extract that titleid when the list box is clicked upon. Can anyone post the correct syntax plz. Thanks.
I tried these but it did not work, perhaps I am loading the index wrong? Any help would be great
MsgBox (lstTitles.ItemData(Index))
MsgBox (lstTitles.Index)
And need to later extract that ID.
Heres what I got so far
If Not objRec.EOF Then objRec.MoveFirst
Do While Not objRec.EOF
lstTitles.AddItem objRec!Job_Title
lstTitles.ItemData(lstTitles.NewIndex) = objRec!titleid
objRec.MoveNext
Loop
This adds the Job Title and TitleID as index I assume?
What I need to do is extract that titleid when the list box is clicked upon. Can anyone post the correct syntax plz. Thanks.
I tried these but it did not work, perhaps I am loading the index wrong? Any help would be great
MsgBox (lstTitles.ItemData(Index))
MsgBox (lstTitles.Index)