• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 243
  • Last Modified:

Increment a text box date automatically

In a form I have a command button that executes an append query. After the append query has executed I would like to automatically add a day to an unbound text box that contains a date. I thought adding code to the event that executes the append query would be appropriate. What code would I add? Thanks.
  • 2
1 Solution
Use the DateAdd() function;

for example DateAdd("d",1,[YourDateField])

StampITAuthor Commented:
Thank you, Daniel.
danishhani's response is correct under normal circumstances but in this instance there may be some problem.

If the textbox is unbounded then I presume that it will not contain any value so there is not value to purform the dateadd function on.
StampITAuthor Commented:
The unbound textbox does have a default value when the form opens which the user can change. There should always be a value. Thanks for the comment.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now