Access-o-Mania

Access-Forum (Deutsch/German) => Formular => Thema gestartet von: rbaltermi am Juni 15, 2010, 22:31:44

Titel: Datum im Kombinationsfeld auswählen, Heute +5 Tage
Beitrag von: rbaltermi am Juni 15, 2010, 22:31:44
Hallo Zusammen

Mir hat der Code für die Selektion aktueller Daten in einem Kombinationsfeld

Zitat von: LustigSven am September 04, 2006, 17:38:48



Private Sub Form_Load()

   Dim iCounter As Integer
   
   Me.Kombinationsfeld0.RowSource = Format(Date, "dd.mm.yyyy")
   For iCounter = 1 To 14
       Me.Kombinationsfeld0.RowSource = Me.Kombinationsfeld0.RowSource & ";" & Format(Date - iCounter, "dd.mm.yyyy")
   Next iCounter
   
End Sub



sehr geholfen. Ich möchte jedoch die nächsten 5 Tage anzeigen. (Heute + 5 Tage).  Kann mir jemand einen Tipp geben?

Danke

Roli
Titel: Re: Datum im Kombinationsfeld auswählen, Heute +5 Tage
Beitrag von: MzKlMu am Juni 15, 2010, 23:36:49
Hallo,
aus 14 mach 5 und aus - mach +  ;D
Private Sub Form_Load()

    Dim iCounter As Integer
   
    Me.Kombinationsfeld0.RowSource = Format(Date, "dd.mm.yyyy")
    For iCounter = 1 To 5
        Me.Kombinationsfeld0.RowSource = Me.Kombinationsfeld0.RowSource & ";" & Format(Date + iCounter, "dd.mm.yyyy")
    Next iCounter
   
End Sub

Titel: Re: Datum im Kombinationsfeld auswählen, Heute +5 Tage
Beitrag von: rbaltermi am Juni 16, 2010, 10:44:32
Danke Das habe ich glatt übersehen!