How do I get the current date to display in a text box named "date" I have bound to the form in Access.
Do I put the code in the before update procedure? If not which one do I put it in? I just want the date to display on the current record.
Thanks for your help.
It depends a lot more on what you want to do. If you only want the current date to appear on a new record then put the date function you've chosen to use (from your previous post) into the default value of either the table or the form. Then each time you create a new record the date field will defaul to todays date.
If you want any record that has just been accessed (i.e. made current), to change then you could use the "on current" event for the form so that every time you navigate to another record the date will change to today (probably not what you want).
If you want to change the date to reflect when a record was last edited then the forms "after update" might suit (although you probably won't seee the changes until to go into the record again). "before update" should be fine also. Read the help on these as there are subtle differences. Also take a look at "before insert".
As I say, it depends on what you want to cause the trigger.
If you click next to the event in the properties screen and then press the help (F1) key you will get a good (but not perfect !) description of what each event does i.e. how it is triggered.
that should do the trick, you can put that line in the form_load event.
If you do not use VB, put 'Date()' (without quotes) in the property field called 'defaultvalue' when you open the form, the date apears in the box..
if you want to dispay the date from a table, a value in a table i mean,
put the name of the datecolumn in the ControlSource property