[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 240
  • 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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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