Today's Date

  • Thread starter Thread starter ExcessAccess97
  • Start date Start date
E

ExcessAccess97

Is it possible to create a field for dates, that will
always contain the current date? Maybe it could get
todays date from the pc?
 
Okay, I did that. I see the date field, but there's
nothing in it. Are we forgetting something?
 
When will today's date appear in he field?

When you create a new record.

If you just want to see today's date on a Form, without storing it in
any table, simply set the Control Source of a Textbox on the form to

=Date()
 
Is there an easy way to make this happen for all of my old
records?

To make... WHAT happen? To have a date field in the old record loaded
with the date that the record was created? No. That information does
not exist anywhere. To load a table Date field with today's date?
Sure, run an Update query with a criterion on the date field of IS
NULL, updating the field to Date(). To see today's date on a Form
along with data from the record? Sure, just set the Control Source of
a textbox on the form to =Date().
 
When you use Date(), where does it pull THAT date from?

It sounds like what I want to do isn't really possible. I
currently have a table of existing records. I routinely
export this table as a products file to an online store.
In the online store, each record has the neccessary
components (fields) to represent each individual product.
(SKUID is the primary key).

What I'd like to do is have each record also display the
date and time it was last updated. I figured I'd create a
date field and find a way to populate it with the current
time and date "on-the-fly."

Make sense? Possible?
Thanks again.
J
 
When you use Date(), where does it pull THAT date from?
The system clock on your PC.

Great, that seems perfect.
It's quite possible - if you make clear what you are trying to
accomplish!

In any exchange between communicatiing parties, it may
(and often does) take several attempts to accurately
convey "what one means." (Particularly when one who has
inadequate knowledge of a subject wishes to seek a higher
level of knowledge from another.) I appreciate your
patience and your help.


You asked:
Is it possible to create a field for dates, that will
always contain the current date?

and *THAT* is the question we've been answering.

And NOW I see that, though it turns out to only be one
answer of many and with stipulations (Date() only works
for new records but not existing ones).


Just trying to better articulate what I'm trying to do.
Take your pick. If you want to record the date and time that the
record was EXPORTED, create a Query based on your table, and include a
calculated field in it by typing:

RecordExported: Now()

Now() returns the current date and time; Date() just the date (which -
again - is what you had asked for).

That's exactly what I asked for.
Okay, I'm trying this right now. I've been creating this
products file with a make-table query. I'll add
RecordExported: Now() to the criteria of the Date field.
If, instead, you want to timestamp each record with the date and time
that the contents of the record in the table change, you must use some
VBA code on a Form (and must ensure that the record can only be
updated using the Form). In the Form's BeforeUpdate event put code
like

Me!txtTimeStamp = Now()

where txtTimeStamp is a textbox bound to the date/time field.

Would barely know where to begin with this latter option.

Jarrod
 
Take your pick. If you want to record the date and time that the
record was EXPORTED, create a Query based on your table, and include a
calculated field in it by typing:

RecordExported: Now()


Will this work if the Query is a make-table query? Or
does it need to be an update query? Oh wait. How do I
make "calculated field?"

Jarrod
 
Okay, got it rollin'. New addition now on the web.
Thanks for the solution, and I even learned a bit.
Thanks.

Jarrod
 
Back
Top