Hello:
Please see the image below. What I am trying to achieve is when the user clicks on a letter (26 labels), the subform is filtered to the field fldLETTER according to the label. I have about 19,000 records and each has a 1 letter code for sorting. So when they click on label1 (A), it would filter the subform to only records that have a value of A in the the field fldLETTER.
One thought was to have a hidden textbox when the button is clicked, the text box is updated with the text value, as I have here in this code:
My problem is trying to come up with a way to either filter the subform based on the change in the hidden text box (txtLETTER), or just when the button is clicked.
Does anyone have any suggestions? I appreciate any help in advance.
Please see the image below. What I am trying to achieve is when the user clicks on a letter (26 labels), the subform is filtered to the field fldLETTER according to the label. I have about 19,000 records and each has a 1 letter code for sorting. So when they click on label1 (A), it would filter the subform to only records that have a value of A in the the field fldLETTER.
One thought was to have a hidden textbox when the button is clicked, the text box is updated with the text value, as I have here in this code:
Code:
Private Sub Label1_Click()
txtLETTER.Value = "A"
End Sub
My problem is trying to come up with a way to either filter the subform based on the change in the hidden text box (txtLETTER), or just when the button is clicked.
Does anyone have any suggestions? I appreciate any help in advance.