date

rainbows

Registered User.
Local time
Today, 00:30
Joined
Apr 21, 2017
Messages
428
hi
I have a target date field in my form , what I would like to record is the date when someone enters the target date for the first time only could you please advise the best way for me to do this

thank you

steve
 
create another field called say TimeStamp and set it's default property to Now()

Since this is not a field the user will need access to, no need to display on a form. If you do, ensure the control is disabled
 
you can also create a Data Macro for your table, use Before Change macro.
supposed that TargetDate is your DateField and TargetDateEntered is the date the
TargetDate is entered for the first time:
macro.png
 
Issue List

in the snapshot you will see a date the ARNO was opened the 4 column so lets say the user don't put a targetdate in ( f which sometimes they cant because they need other peoples input but I want to record that time from when it was opened until the target date was set you can see record no 3 is closed and it was late by 42 days . but this might not be true that's why I want to log the date the target date was entered . I don't want that date to change even if the target date changes the timestamp date repeats it self on all records ???

thanks for you help
Issue List

ARNOtargetDatedays late/earlyOpened DateDateclosedtimestamp
3​
17/10/2021​
42​
22-Oct-21​
28/11/2021​
22/10/2021 09:55:19
4​
17/10/2021​
5​
22-Oct-21​
22/10/2021 09:55:19
1​
08/10/2021​
14​
21-Oct-21​
22/10/2021 09:55:19
2​
24/10/2021​
-2​
21-Oct-21​
22/10/2021 09:55:19
5​
24/10/2021​
-2​
22-Oct-21​
22/10/2021 09:55:19
6​
16/10/2021​
6​
22-Oct-21​
22/10/2021 09:55:19
 
it repeat because you set it as Default value.
 
you originally said

I have a target date field in my form , what I would like to record is the date when someone enters the target date for the first time only could you please advise the best way for me to do this

now you are saying

but I want to record that time from when it was opened until the target date was set

so by when it was opened, you don't mean from when the record was created, you mean you want the datetime someone completed the opened date and the datetime someone completed the target date, regardless of the values of those two fields

timestamp is just to show when the record was created - if that is the same as the time the opened date is populated you can use that, plus Arnel's macro

Otherwise forget the timestamp column, you need two datetime columns and use a modification to Arnel's macro to update the two new fields

Or just use Arnel's macro and compare that to the opened date
 
sorry if I have mislead you
lets take ARNO number 3
the record was created on the 22/10 without the targetdate being entered
but lets say the target date was entered in record no 3 on the 29/10 I would like a record that tells me it was entered on the 29/10 if I change that target date on record no 3 on say on 3/11 I don't want it to change the first date I want it to stay at the 29/10

hope I have explained it better

thanks
steve
 
in that case Arnel's solution will work - have you tried it?

edit: except on the first line there is a type - =fase should be =false
 
Last edited:
I have looked at it but to be honest I don't know where to put it. on my form , table and I cannot see where I find the "before change "

steve
 
it does not go into a form, but into the table

open the table in design view, on the ribbon you will see an option for create data macros - click on it

5th option down is before change. Click on that and refer to Arnels post to complete it
 
you do have a field called targetdateentered?
 
Try
Code:
If IsNull([targetdate])=False Then
    If IsNull([targetdateentered])= True Then
        [targetdateentered]=Now()
    End If
End If
It appears you may have mixed brackets [] with parentheses ()
 
1634972114018.png

I still have the same problem and this field is in the table " targetdateentered

thanks steve
 
thank you for all your help / it seems to be working now with the code Larry E sent
 

Users who are viewing this thread

Back
Top Bottom