updating a date on a text box

A

Alex Martinez

Hi,

I have a form with several date text boxes. One of the text box contains a
month end date. I would like to have a separate text box where the user can
input next month/following month end date in the new text box and press a
command button that will update the current month end date text box. For
example the current month end date is 10/31/2005 the user will type in the
Nov. 30, 2005 date and press the command button I like to have the month
end date to be 11/30/2005. Now I want to fully update the enitre table
instead of just one record. Can this be done? Can tips or visit a website
will be appreciated. Thank you
 
G

Gary Miller

If you are wanting to udate EVERY record in the underlying
table this should work, although I suggest having them enter
it as 11/30/2005 rather than the abbreviated month in your
example. Change this for your true field and control names.

Dim SQL as String
SQL = "UPDATE YourTableName SET YourMonthEndDateField = #" &
Me!YourEntryControlName & "#"
docmd.runSQL

Look in help for SetWarnings if you want to learn how to
turn off the warning messages that will appear. You can turn
them off but there are some issues with making sure that
they get turned back on in all events.
 

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

Top