Bom dia Srs, gostaria de saber se existe como fazer filtros em uma caixa de listagem com opções em subformulário
Segue o arquivo em anexo, por gentileza ajudem!
Segue o arquivo em anexo, por gentileza ajudem!
Private Sub OptFiltros_Click()
Dim sSQL As String
If Me.OptFiltros.Value = 1 Then
sSQL = "SELECT * FROM Qry_PesqCadPeriodo"
Me.PesqList.RowSource = sSQL
ElseIf Me.OptFiltros.Value = 2 Then
sSQL = "SELECT * FROM Qry_PesqCadPeriodo WHERE Fechado = -1"
Me.PesqList.RowSource = sSQL
End If
Me.PesqList.Requery
End Sub
Private Sub PesqCamp_KeyPress(KeyAscii As Integer)
Me.OptFiltros.Value = 1
OptFiltros_Click
End Sub
|
|