Next Record Event

L

ll

Hi,
I am wanting to add the current date to each new form, as I advance
through the recordset, using the buttons built in to the form at the
bottom. I have currently the following code, but I am wanting to
enable the date stamp on successive record entries in the same
session. Thanks, Louis
---------

Private Sub Form_Load()
'Set date stamp on current record
Text50.Value = Date
End Sub
 
A

Al Campagna

ll,
First, you should name your objects something more meaningful than Text50... something
CreateDate, or InvoiceDate, MyDate etc...
Delete the code you have now in the OnLoad event.

Next, is Text50 a Date/Time field in yout table? If not, make it so...then you can
just have the DefaultValue for Text50 set to...
=Date()
Make sure the Format for the control on the form is something like mm/dd/yy to display
the date the way you want.
Every time you open a New record, the current Date will be "automagically" entered into
Text50.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Top