ACCESS97: Funktion für aktuelles Jahr als Z-folge?

Wie kann ich in einem Textfeld (Anzahl der Zeichen = 4) das aktuelle Jahr in der Form „1999“ mit Hilfe einer Funktion vorgenben, d. h. obiger Wert soll bei Neueingabe von Umsätzen als Vorgabe in dem Feld Geschäftsjahr stehen!

Wichtig: das Datum sollte nicht als aktuelles Datum vorgeben werden (17.1.98), sondern nur das Jahr als Zeichenfolge.

Ich hoffe, ich habe mich klar ausgedrückt u. bedanke mich jetzt schon für Euere Tips!

Gruesse

Franz

hallo Franz,

in Word ist es etwa das:

Dim Datum As Date
Datum = „1.1.97“
TextBox1.Text = Format(Datum, „yyyy“)

oder

TextBox1.Text = Format(Date, „yyyy“)

In Access müsste es eigentlich fast identisch sein.

nfg Günter
http://www.vba-home.de.cx

hallo Günter,

danke für Deine schnelle u. prompte Hilfe!

Gruesse aus Niederbayern

Franz Englbrecht

hallo Franz,

in Word ist es etwa das:

Dim Datum As Date
Datum = „1.1.97“
TextBox1.Text = Format(Datum, „yyyy“)

oder

TextBox1.Text = Format(Date, „yyyy“)

In Access müsste es eigentlich fast
identisch sein.

nfg Günter
http://www.vba-home.de.cx