View Full Version : command button


dbertanjoli
04-08-2001, 10:46 AM
Hello,
I am trying to do the following: by pressing the command button I would like to fill out the date field (only year). It is probably easy but please somobody help me.
Deb

Jack Cowley
04-08-2001, 10:48 AM
In the On Click event of your Command button put code similar to this: Me![NameOfFieldToGetDate] = Year(Date)

That should do it for you...

dbertanjoli
04-09-2001, 08:42 AM
Dear Jack and other,

I was trying to implement your code but whatever I tried I always get this message "Invalid use of Null". I have a date field in each form. Instead of typing in the Year (I need only the year)I would like to have an option that date field is filled automatically by pressing command button.

Please help.

Debbie