Exported VBA
This commit is contained in:
137
wgmaster/vba/Form_MAnlieferungenJahresvergleich.frm
Normal file
137
wgmaster/vba/Form_MAnlieferungenJahresvergleich.frm
Normal file
@ -0,0 +1,137 @@
|
||||
Dim filter1 As String
|
||||
|
||||
Private Sub Babbrechen_Click()
|
||||
|
||||
DoCmd.Close
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BDetailliert_Click()
|
||||
|
||||
If IsNull(TVon) Then
|
||||
MsgBox ("Bitte geben Sie im Feld 'Von' das Startjahr der Auswertung ein")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If IsNull(TBis) Then
|
||||
MsgBox ("Bitte geben Sie im Feld 'Bis' das Endjahr der Auswertung ein")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
SetFilter
|
||||
|
||||
DoCmd.OpenReport "BAnlieferungenJahresvergleichDetail", acViewPreview, , filter1
|
||||
|
||||
DoCmd.Maximize
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BOk_Click()
|
||||
|
||||
If IsNull(TVon) Then
|
||||
MsgBox ("Bitte geben Sie im Feld 'Von' das Startjahr der Auswertung ein")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If IsNull(TBis) Then
|
||||
MsgBox ("Bitte geben Sie im Feld 'Bis' das Endjahr der Auswertung ein")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
SetFilter
|
||||
'MsgBox (filter1)
|
||||
|
||||
DoCmd.OpenReport "BAnlieferungenJahresVergleichDetail", acViewPreview, , filter1
|
||||
|
||||
DoCmd.Maximize
|
||||
|
||||
End Sub
|
||||
|
||||
Sub SetFilter()
|
||||
|
||||
|
||||
filter1 = "Storniert=False AND "
|
||||
|
||||
If IsNull(TZNR) Or TZNR = "" Then
|
||||
Else
|
||||
filter1 = filter1 + "[ZNR]=" + Format(TZNR) + " AND "
|
||||
End If
|
||||
|
||||
If IsNull(TVon) Or TVon = "" Then
|
||||
Else
|
||||
filter1 = filter1 + "Year(Datum)>=" + Format(TVon) + " AND "
|
||||
End If
|
||||
|
||||
If IsNull(TBis) Or TBis = "" Then
|
||||
Else
|
||||
filter1 = filter1 + "Year(Datum)<=" + Format(TBis) + " AND "
|
||||
End If
|
||||
|
||||
If IsNull(TSNR) Or TSNR = "" Then
|
||||
Else
|
||||
filter1 = filter1 + "SNR='" + Format(TSNR) + "' AND "
|
||||
End If
|
||||
|
||||
If IsNull(TSANR) Or TSANR = "" Then
|
||||
Else
|
||||
filter1 = filter1 + "SANR='" + Format(TSANR) + "' AND "
|
||||
End If
|
||||
|
||||
|
||||
If OAktiveMitglieder = True Then
|
||||
filter1 = filter1 + "[Aktives Mitglied]=True AND "
|
||||
End If
|
||||
|
||||
|
||||
If IsNull(TVon1) Then
|
||||
v1 = 0
|
||||
Else
|
||||
v1 = TVon1
|
||||
End If
|
||||
|
||||
If IsNull(TBis1) Then
|
||||
b1 = 999999
|
||||
Else
|
||||
b1 = TBis1
|
||||
End If
|
||||
|
||||
|
||||
Select Case OListe
|
||||
Case 1:
|
||||
|
||||
filter1 = filter1 + "MGNR>=" + Format(v1) + " AND MGNR<=" + Format(b1)
|
||||
'MsgBox (filter1)
|
||||
Case 2:
|
||||
filter1 = filter1 + "PLZ>='" + Format(v1) + "' AND PLZ<='" + Format(b1) + "'"
|
||||
'MsgBox (filter1)
|
||||
End Select
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Open(Cancel As Integer)
|
||||
|
||||
OListe = 1
|
||||
TVon = year(Date) - 5
|
||||
TBis = year(Date)
|
||||
OSortenattributeBeiFlächenbindungOptional = False
|
||||
OAktiveMitglieder = True
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub TFusstext_Exit(Cancel As Integer)
|
||||
|
||||
If IsNull(TFusstext.Value) Then
|
||||
SetParameter "ANLIEFTEXT", " "
|
||||
Else
|
||||
SetParameter "ANLIEFTEXT", TFusstext.Value
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
Reference in New Issue
Block a user