crovador 12/7/2021, 23:45
Ela está alimentada normal pelo banco access, posso colocar os códigos aqui para vc ver, mas preciso filtrar os dados que já estão na listview.
Segue os códigos que alimentam a listview...
Private Sub UserForm_Initialize()
EMISSAO.Enabled = False
VENCIMENTO.Enabled = False
Call RemoveBotao(Me)
Me.ListView1.ListItems.Clear
PLACA.Clear
sql = "SELECT * FROM TB_FROTA"
sql = sql & " ORDER BY TB_FROTA.PLACA_VEICULO;"
Call conexao_consulta
Do Until (consulta.EOF)
PLACA.AddItem consulta!PLACA_VEICULO
consulta.MoveNext
Loop
'--------------------------------------------------------------
With ListView1
.Gridlines = True
.View = lvwReport
.FullRowSelect = True
.LabelEdit = lvwManual
.CheckBoxes = True
.ColumnHeaders.Add Text:=" ", Width:=14 ', Alignment:=fmAlignmentRight
.ColumnHeaders.Add Text:="PLACA", Width:=50 ', Alignment:=fmAlignmentRight
.ColumnHeaders.Add Text:="NOME/CNPJ", Width:=185 ', Alignment:=fmAlignmentRight
.ColumnHeaders.Add Text:="CONTATO", Width:=90 ', Alignment:=fmAlignmentRight
.ColumnHeaders.Add Text:="TEL. FIXO", Width:=70 ', Alignment:=fmAlignmentRight
.ColumnHeaders.Add Text:="TEL.CELULAR", Width:=70 ', Alignment:=fmAlignmentRight
.ColumnHeaders.Add Text:="EMISSÃO", Width:=55 ', Alignment:=fmAlignmentRight
.ColumnHeaders.Add Text:="VENCIMENTO", Width:=60 ', Alignment:=fmAlignmentRight
.ColumnHeaders.Add Text:="Nº DIAS À VENCER", Width:=150 ', Alignment:=fmAlignmentRight
.ColumnHeaders.Add Text:="SITUAÇÃO", Width:=55 ', Alignment:=fmAlignmentRight
End With
'Call atualizar
Call CommandButton1_Click
End Sub