austinsneeze
New member
- Local time
- Today, 07:15
- Joined
- May 5, 2023
- Messages
- 6
I have a query that is supposed to populate in my unbound list box when the option button is selected.
But it isn't populating
The "Type as you go filter" does work with the "Starts with..." option button, but the list box isn't generating the query on click.
But it isn't populating
The "Type as you go filter" does work with the "Starts with..." option button, but the list box isn't generating the query on click.
Code:
Private Sub Form_Load()
Me.txtFltr_lstMtrls.Enabled = False
End Sub
Private Sub fraSrchTyp_AfterUpdate()
Select Case fraSrchTyp
Case 1
Me.lstMtrls.RowSource = "qrylstMtrls_SrtsWth"
Me.txtFltr_lstMtrls.Enabled = True
Case 2
Me.lstMtrls.RowSource = "qryMtrls_Cntns"
Me.txtFltr_lstMtrls.Enabled = True
Case 3
Me.lstMtrls.RowSource = "qrylstMtrls_All"
Me.txtFltr_lstMtrls.Enabled = False
End Select
End Sub
Private Sub lstMtrls_DblClick(Cancel As Integer)
If Not IsNull(Me.lstMtrls.Value) Then
'Me.Recordset.FindFirst "MtrlNm = '" & Me.lstMtrls & "'"
Form.Requery
End If
End Sub
Private Sub txtFltr_lstMtrls_Change()
If txtFltr_lstMtrls.Text = "" Then
lstMtrls.RowSource = "qrylstMtrls_All"
Else
If fraSrchTyp = 1 Then
lstMtrls.RowSource = "qrylstMtrls_StrtsWth"
Else
lstMtrls.RowSource = "qryMtrls_Cntns"
End If
End If
End Sub
Attachments
Last edited: