Why no V ?Hi all
Can I have a list box in a form that looks like the attached image and I can search for records that begin with each letter?
Thanks
What is the cod if i want to have buttons A-Z and then a listbox. when i click on Ex buton A so listbox shows all records starts with A?Use textboxes or buttons.
I have tried to do that but it doesn´t work. I attach my DB here. Maybe I did something wrongSet listbox RowSource property. Code in each button Click event:
Me.Listboxname.RowSource = "SELECT * FROM table WHERE somefield LIKE 'A*';"
Private Function SetRowSource()
Me.lbxNamn.RowSource = "SELECT * FROM tblKund WHERE Namn LIKE """ & Screen.ActiveControl.Tag & "*"""
End Function
=SetRowSource()
can search for records that begin with each letter?
Interesting approach. I bookmarked it and want to try it later.
Unfortunately Office 365 says it can not open this file
Private Sub lblAlpha_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Filter = "fldLastName LIKE '" & Chr(64 - Int(-X / Me.lblAlpha.Width * 26)) & "*'"
Me.FilterOn = True
End Sub
If you start clicking from A, your sample file works until letter H
I didn't use any font. I simply opened your form in sample file attached in #17What font are you using? It must be a Fixed-Width font.
Make sure the label width doesn't have any space after the 'Z'