-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform-filtro.vb
More file actions
43 lines (30 loc) · 1003 Bytes
/
form-filtro.vb
File metadata and controls
43 lines (30 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
' Formulario Filtro
Sub BtnOk_Click()
Dim StrSQL As String
StrSQL = "Select * from Clientes Where"
Rem Os campos caracter, memo e date tem um valor de tipo maior que 7
if BDados.TableDefs("Clientes").Fields
(Cmbcampo.Text).type > 7 then
StrSQL = StrSQL & CmdCampo.Text & CmbOperador.Text & """" & TxtCond.Text & """"
Else
StrSQL = StrSQL & CmbCampo.Text & CmbOperador.Text & txtCond.Text
End if
Set Dyclientes = BDados.Createdynaset(StrSQL)
Unload FrmFiltro
End Sub
Sub Form.Load()
Dim i as integer
Rem Adiciona ao Combo Box de Campos o nome dos campos da tabela
For i=0 to
BDados.TableDefs("Clientes").Fields.Count - 1
CmbCampo.AddItem
BDados.TableDefs("Clientes").Fields(i).Name
Next
CmbOperador.AddItem "="
CmbOperador.AddItem ">"
CmbOperador.AddItem ">="
CmbOperador.AddItem "<"
CmbOperador.AddItem "<="
CmbOperador.AddItem "<>"
CmbOperador.AddItem "LIKE"
Endsub