change date with button

D

Dave Smith

hi everybody, i would like to use a button to change a date in a text box
(which when record was first entered i used the "Date()" as the default
value)

after the customer is phoned & the call is unsuccessful, i want to click on
the button to change the date from it's previous date to the current date of
today. (the query is sorted ascending in the date column)

hope there is enough info here...

Dave
 
R

Rick Brandt

Dave said:
hi everybody, i would like to use a button to change a date in a text
box (which when record was first entered i used the "Date()" as the
default value)

after the customer is phoned & the call is unsuccessful, i want to
click on the button to change the date from it's previous date to the
current date of today. (the query is sorted ascending in the date
column)
hope there is enough info here...

Dave

In the Click event of your button...

Me.DateFieldName = Date()
 
D

Dave Smith

hi rick, thanks for the reply, it makes sense, however i'm getting an error
message saying "the object doesn't contain the Automation object 'Me.'"

i just cant seem to find what that means...

hope you can help

Dave
 
D

Dave Smith

hi rick, no not exactly, i put that line in the expression builder, but now
that i have read your message, i have put it in the code section as you
described & whallah!

cheers mate.

Dave
Rick Brandt said:
Dave said:
hi rick, thanks for the reply, it makes sense, however i'm getting an
error message saying "the object doesn't contain the Automation
object 'Me.'"

i just cant seem to find what that means...

hope you can help

Exactly how and where did you put the code? You should have...

Entered "[Event Procedure]" in the Click event property box of the
property
sheet. Then pressed the build button [...] to the right of that box.
That
would have taken you to the VBA code window where you have entered the
line...

Me.ControlName = Date
(substituting your control name)

Is that what you did?
 
Top