467,180 Members | 1,097 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,180 developers. It's quick & easy.

adding number to date in access form

100+
Hello,
txtbox one has a date.
txtbox two has a number. number is number of days)
txtbox three is empty.
I have alot more going on but this is my question:
can I add txtbox1 + txtbox2 and show answer in txtbox3?
example:
txtbox1 - 1/2/2008
txtbox - 2
txtbox3 -1/4/2008
thank you
Jul 24 '08 #1
  • viewed: 1700
Share:
7 Replies
Yes you can do that.
Jul 24 '08 #2
100+
not sure how to do it
do i go into properties of txtbox in control source or do I go into vb code.
Thank you
Jul 24 '08 #3
not sure how to do it
do i go into properties of txtbox in control source or do I go into vb code.
Thank you
I guess it depends on what your doing. You could trigger some vb code similar to the following from the after update of the two text boxes to populate the txtbox3 with the answer.

Expand|Select|Wrap|Line Numbers
  1.  me.txtbox3 = me.txtbox1 + me.txtbox2 
Jul 24 '08 #4
Delerna
Expert 1GB
Using your naming convention
Expand|Select|Wrap|Line Numbers
  1. txtBox3 = DateAdd("m", txtBox , CDate(txtBox1))
  2.  
a better way

Expand|Select|Wrap|Line Numbers
  1. txtResult = DateAdd("m", txtMonths , CDate(txtDte))
  2.  
Jul 24 '08 #5
100+
yes that worked- thank you
Jul 24 '08 #6
missinglinq
Expert 2GB
I've been doing this since the '90s! They keep telling me Date + 3 won't work in the future, but it still does!

Linq ;0)>
Jul 24 '08 #7
Delerna
Expert 1GB
I've been doing this since the '90s! They keep telling me Date + 3 won't work in the future, but it still does!

Linq ;0)>
Yes, and about that time they recommended not using DoCMD for the same reason. But its still there.I don't know about the latest version though.
Jul 24 '08 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by 6thirty | last post: by
3 posts views Thread by tai.cabrera@gmail.com | last post: by
1 post views Thread by Nigel Heald | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.