How to make a specific textbox become current system date to all records

juniepiper27

Registered User.
Local time
Today, 09:15
Joined
Sep 24, 2014
Messages
49
Hi!

I have a problem in my Database system. The title of my Database is Employee Evaluation. This is my problem.. I already make the default value the txtbox a current system date. but for the next day.. the txtbox for all record should become a current system date. but only the for the new record is the current system date. the all records are not current system date.. please help to this problem... I want from the opening of my system the textbox of all records are should be current system date.

Thank you so much...
 
Do you mean that you have a field in a table in your database, (a column) that stores the date?

And every time you load the database you want to update this to the current date?
 
Why would you do this? It does NOT make sence?
 
Do you mean that you have a field in a table in your database, (a column) that stores the date?

And every time you load the database you want to update this to the current date?
yes.! exactly! I make a database from table, query up to Forms. I want the the fields from table to become a system current date everytime I Open my database.. the field in the table are connected in the forms via query. all field in the tables, I make a text field in my forms..

this is the scenario..
txtissued date - date format
txtisreceived date - date format
txtduration days. - numeric format
txtcurrent date. - date format & dafault value from table is =Date()

if I put the date into the txtissued date, the txtduration days will count the number of days everyday from the current system date, if I there's no date for txtreceived date. but if I put a received date the duration days automatically count the duration days. I already make all the calculation for all field. but the problem is everytime I open my database system the txtcurrent date for all record is still not the current system date.. I want from opening of my database the txtxcurrent date should become a current system date.. I already make a refresh command button but still the txtcurrent date is not a current system date.
 
yes.! exactly! I make a database from table, query up to Forms. I want the the fields from table to become a system current date everytime I Open my database.. the field in the table are connected in the forms via query. all field in the tables, I make a text field in my forms..

this is the scenario..
txtissued date - date format
txtisreceived date - date format
txtduration days. - numeric format
txtcurrent date. - date format & dafault value from table is =Date()

if I put the date into the txtissued date, the txtduration days will count the number of days everyday from the current system date, if I there's no date for txtreceived date. but if I put a received date the duration days automatically count the duration days. I already make all the calculation for all field. but the problem is everytime I open my database system the txtcurrent date for all record is still not the current system date.. I want from opening of my database the txtxcurrent date should become a current system date.. I already make a refresh command button but still the txtcurrent date is not a current system date.
 
You don't need to put the current system date into a field, you could just use the current system date in your calculations..
 
You don't need to put the current system date into a field, you could just use the current system date in your calculations..

ahh.. but I make a expression code in the table in the field of duration days that connected to the current date. If I don't make the the field of a txtcurrent date, a current date, the calculation of duration days will become error..
 
ahh.. but I make a expression code in the table in the field of duration days that connected to the current date. If I don't make the the field of a txtcurrent date, a current date, the calculation of duration days will become error..


and also the records from the field is connected to my reports of my database... therefore its very important to me that the field of current date should become a system current date everytime I open my database... please help me coz I need it to my work as HR Secretary... I make a database for the evaluation of our Employee
 
The same goes for your reports you can use the current system date in those instead of having it saved in a table field.
 
The same goes for your reports you can use the current system date in those instead of having it saved in a table field.


ahh.. you mean I can make a calcuation direct from the form? or in the form properties of txtcurrent date.. I can make the default value as =Date()
 
thank you it working now... thank you so much.. & more power!


Sir, There still have a problem in database... after I opened today.. in the form, the textcurrent date is today date.. but the table & query which the txtduration days is connected is not updated. still in the record is yesterday date.. I want also in the record in query the date should become current system date everyday.. because my report is base on the record in the query..

hope you help me with my problem

thanks & more power
 
You don't need to put the current system date into a field, you could just use the current system date in your calculations..

dont store data you dont need to... if a date field is always todays date, remove the field from your table and add this field in your query to contain only todays date...

Still sounds like a strange requirement to have todays date there, but ... its your database.
 
dont store data you dont need to... if a date field is always todays date, remove the field from your table and add this field in your query to contain only todays date...

Still sounds like a strange requirement to have todays date there, but ... its your database.


Sir, in the table field the durationdays is a calculated type and it has a expression builder of this.. IIf(IsNull([evlrecved]),[ddat]-[evldteisued],[evlrecved]-[evldteisued]) the "daat" is the current date field. If I will remove the ddat-current date the code for durationdys will become error.. if you can give me another expression code that evldteisued will subtract from the current system date much better.. pls help me in this problem...

thanks,
 
dont store data you dont need to... if a date field is always todays date, remove the field from your table and add this field in your query to contain only todays date...

Still sounds like a strange requirement to have todays date there, but ... its your database.

if possible to attached of sent my data base on you I will do it.. if you can give me your e-mail...
 
how about instead of storing the field in the table you simply add it here
IIf(IsNull([evlrecved]),Date()-[evldteisued],[evlrecved]-[evldteisued])
 
how about instead of storing the field in the table you simply add it here
IIf(IsNull([evlrecved]),Date()-[evldteisued],[evlrecved]-[evldteisued])


Sir, the above expression code you given to me was error.. this is the error message.. The expression IIf(IsNull([evlrecved]),Date()-[evldteisued],[evlrecved]-[evldteisued]) cannot be used in a calculated column.

thanks,
 
Strike that, the IIF as is should work... dont understand why it should error out?

A more concise formula would be:
NZ([evlrecved], Date())-[evldteisued]
 

Users who are viewing this thread

Back
Top Bottom