day of the week problem

hoschi

Registered User.
Local time
Today, 23:11
Joined
Sep 11, 2002
Messages
16
hi there

I got 2 text boxes: datum and day

in the datum-textbox I enter a date and I want that the second textbox (day) automatically updates itself with the Day of the Week!

I know it must be done with following code but it does not work:
=Format([datum],"dddd")

Where have I to put this code, I thought in the Property Field "Format" of the second Textbox called "day"???

I go crazy about this problem

thanx in advance

hoschi
 
I forgot to say: I work with access 97!
 
Try this:

=Format(Weekday(Me.datum)+1,"dddd")
 
Last edited:
Sorry, in the AfterUpdate event of the first textbox.
 
Is this on a form or in a table?

If it is on a form, do it in the class module. Build an event for Datum that is based on "After Update" event. Code might be so simple as

Private Sub Datum_AfterUpdate()

[Day] = Format(Weekday([Datum])+1,"dddd")

End Sub
 
You don't need to store this value since it can be calculated at any time, set the control source of the second textbox to =[datum], set the format for the control on the property sheet to dddd
 
thanx to all, I did it like rich said and it worked fine for me!

thanx a lot

hoschi
 

Users who are viewing this thread

Back
Top Bottom