This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
vba:flexiblerfilter [15.01.2016 11:11:08] yaslaw |
vba:flexiblerfilter [29.01.2019 08:36:08] (current) yaslaw [Mittels Array] |
||
---|---|---|---|
Line 6: | Line 6: | ||
===== Ausgangslage ===== | ===== Ausgangslage ===== | ||
Als Beispiel nehmen wir ein Formular mit 3 Filter. | Als Beispiel nehmen wir ein Formular mit 3 Filter. | ||
- | 1) Ein Textfeld für die Adresse: | + | |
+ | __1) Ein Textfeld für die Adresse:__ | ||
\\ //Formularfeld: txtAddress// | \\ //Formularfeld: txtAddress// | ||
\\ //Tabellenfeld: address// | \\ //Tabellenfeld: address// | ||
\\ //DataType: String// | \\ //DataType: String// | ||
- | 2) Eien Combobox. Inkl. einem Eintrag "-1" und der Beschriftung "ALL" | + | |
+ | __2) Eine Combobox. Inkl. einem Eintrag "-1" und der Beschriftung "ALL"__ | ||
\\ //Formularfeld: cbxAddressType// | \\ //Formularfeld: cbxAddressType// | ||
\\ //Tabellenfeld: addressTypeId// | \\ //Tabellenfeld: addressTypeId// | ||
\\ //DataType: Long// | \\ //DataType: Long// | ||
- | 3) 2 Datumsfelder für ein Between | + | |
+ | __3) 2 Datumsfelder für ein Between__ | ||
\\ //Formularfeld: dtFrom, dtTo// | \\ //Formularfeld: dtFrom, dtTo// | ||
\\ //Tabellenfeld: createDate// | \\ //Tabellenfeld: createDate// | ||
Line 58: | Line 61: | ||
If NZ(me!cbxAddressType, -1) > -1 Then | If NZ(me!cbxAddressType, -1) > -1 Then | ||
i = i + 1: Redim Preserve flt(i) | i = i + 1: Redim Preserve flt(i) | ||
- | v = "addressTypeId = " & me!cbxAddressType | + | flt(i) = "addressTypeId = " & me!cbxAddressType |
End If | End If | ||
If Not IsNull(Me!dtFrom) And Not IsNull(Me.dtTo) Then | If Not IsNull(Me!dtFrom) And Not IsNull(Me.dtTo) Then | ||
i = i + 1: Redim Preserve flt(i) | i = i + 1: Redim Preserve flt(i) | ||
- | v = ftl & "createDate BETWEEN " & format(me!dtFrom, "\#MM-DD-YYYY\#") & " AND " & format(me!dtTo, "\#MM-DD-YYYY\#") | + | flt(i) = ftl & "createDate BETWEEN " & format(me!dtFrom, "\#MM-DD-YYYY\#") & " AND " & format(me!dtTo, "\#MM-DD-YYYY\#") |
End If | End If | ||