RE: AUTODATE
- From: Nixxie <Nixxie@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 7 Nov 2006 07:41:02 -0800
It seems to not be working which is not unusual for my programming and I must
be typing something wrong.
Me.Target_Reply_Date = Me.Start_Date + 28 is what happened when it offered
me the drop down boxes, I have put this in the Start Date AfterUpdate???
Apologies for seeming dim its getting dark here and my understanding is
waining.
Thanks Again
"Cyberwolf" wrote:
To get to the after update Right click on the StartDate field than click on.
properties. At the top of the Properties box is 5 tabs. One is labeled
events. CLick on the tab. there will be an "After Update" Put your cursor
in this field and on the right side there will appear 2 boxes, one with 3
dots "...", and another with an arrow pointing down. Click on the one with
the 3 dots and the choose the Code Builder option and click OK. This will
open up the Microsoft Visual Basic window. Once this is open just type in my
code below that I provide earlier. Make sure the the the name of the
TargetReply is labeled as "TArgetReply" otherwise the code will not work. To
check this right click on the TargetReply field and click properties and then
click on the Other tab at the top and look at the "Name" property.
HTH
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf
"Nixxie" wrote:
Thanks,
I will try that, Can you just give me a little advice in regard to
'AfterUpdate' as I have never heard of it! I am gradually teaching myself
about Access through this forum and havent come across this one before!
"Cyberwolf" wrote:
Usually you would not want to store a calculated field in your table. But
you can do something like this:
Add a field into your table called somehting like this "TargetReply" and set
the field type to Date/Time data type.
Now open the form attached to this table in design view and create a new
field that links the the TargetReply field. Then on the AfterUpdate event on
the StartDAte field put in the following code
me.TargetReply = me.StartDate + 28
THis is untested code and you may need to tweak it
HTH
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf
"Nixxie" wrote:
I need to put a formula into my database that automatically calculates a date.
ie: I have a 'start date' field in my *** and and a 'target reply' field
which needs to be 28 days later than the 'start date' .
Is there some formula or expression that will calculate this to show in the
table rather than just in a query?
(I know it seems lazy to not add by hand this but the database has several
inputters and things can go wrong.)
Any help would be gratefully received.
Thanks
- Follow-Ups:
- RE: AUTODATE
- From: Cyberwolf
- RE: AUTODATE
- References:
- RE: AUTODATE
- From: Cyberwolf
- RE: AUTODATE
- Prev by Date: Re: Training records
- Next by Date: Re: Entering data onto a form
- Previous by thread: RE: AUTODATE
- Next by thread: RE: AUTODATE
- Index(es):