• 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.
0
StampIT
Asked:
StampIT
  • 2
1 Solution
 
danishaniCommented:
Use the DateAdd() function;

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

HTH,
Daniel
0
 
StampITAuthor Commented:
Thank you, Daniel.
0
 
SheilsCommented:
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.
0
 
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.
0
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