vba access listbox highlight with current form ItemData

kantidenos

New member
Local time
Today, 15:40
Joined
Feb 25, 2019
Messages
5
i select my list item which bookmark respective record i my form.
how kan i highlight the current record i listbox when i go to next record i form using the next button i form?
how the select item i listbox kan follow the record i users form?
 
I believe the o/p is asking how the select the correct matching entry in a listbox after selecting a record in the form.?
 
it seems to work only if i put the ID number (like 551, instead for "CA") in to the code.
if i change it to "me.memberID" (to take the forms member ID) nothing happens...then
 
What you're asking for is the reverse of normal usage and makes no sense to me.

The purpose of a listbox is that you select an item from it in order to see details of that item on your form
 
you are right about this.
but it is unfortunately the reverse I need just nu.
when it works for a record why not work for any other.
--------this is my code--------
ar = Me!arendeID
For i = 0 To Listruta24.ListCount - 1
If Listruta24.Column(0, i) = "ar" Then
' Do some stuff
Listruta24.Selected(i) = True
MsgBox ar
End If
Next i
-------------------------------------------------
i appreciate your help any way, thank you
 
I would have expected first column to hold ID and the second column the data.?
So use
Listruta24.Column(1, i)
 
it works nu but need "like" not "="

el = Me!melosID
With Me.List47
For i = 0 To List47.ListCount - 1
If List47.Column(0, i) Like el Then
List47.Selected(i) = True
End If
Next i
End With

thanks a lot!!
 

Users who are viewing this thread

Back
Top Bottom