View Full Version : Generate an auto-date when tick box = true


chuckster
10-10-2000, 05:18 PM
I want to tick a tick-box and then have another field generate the current date and record it in the DB. It seems so easy in VB but I get all sorts of bugs occurring when I do this.

chrismcbride
10-10-2000, 05:29 PM
I would go into the AfterUpdate of the Check Box and type

If me.CheckBoxName = true then
me.DateField = Now()
End If

Good Luck
Chris

chuckster
10-10-2000, 08:01 PM
Thanks M8 works perfectly. What is the Me. commmand for?

[This message has been edited by chuckster (edited 10-10-2000).]

David Mack
10-11-2000, 03:21 AM
'Me' is a special object. It always refers to the current object. For example, if it is used from within the code in a form, it refers to the current form.

From Professional Access 2000 Programming (various authors) page 61.

HTH
Dave Mack

[This message has been edited by David Mack (edited 10-12-2000).]