Hello guys!
How can I put in "date_to" columns, in fields that are empty, to enter current date date (), and to keep dates in other fields as I entered it.
Hello guys!
How can I put in "date_to" columns, in fields that are empty, to enter current date date (), and to keep dates in other fields as I entered it.
Use an Update query , something like
Code:UPDATE YourTableName SET [date_to] = Date() WHERE [date_to] Is Null
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓
I do not know why, but it does not work for me. Is this possible to resolve within the table?
Sure, if you want to edit each one manually, but I don't think that is what you are after!Is this possible to resolve within the table?
Minty's solution worked for me. It is pretty straightforward and the standard way of updating mass data in Access.
What is the name of your table?
Is your "date_to" of the "Date" data type, or is it really text?
Try creating this Update Query manually.
First, create a simple Select query where you select all records where your "date_to" field is empty (IS NULL).
Once you get that to work, then change the Query type to "Update" and add Date() to the "Update" line of the "date_to" field in the Query Builder.
Then run.
Here it is, thank you very much
yet, whether a query will run by himself or I have to start it every day.
Either or.yet, whether a query will run by himself or I have to start it every day.
You can schedule it to run at a certain time (through a Scheduler) or perhaps have it run whenever the database is opened (if there is nothing to update, no harm done).
You can do that by calling the Query to run in Macro and name the Macro "AutoExec".