change date with button

  • Thread starter Thread starter Dave Smith
  • Start date Start date
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
 
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()
 
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
 
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?
 
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top