Timestamping

B

Bon

Hi All,
I want to set up at table where I can enter information that I receive from
a customer. I want to say the time and the date that I received the
information, so I can sort it or search for it later.
At the moment, I have a table CustomerInformation with the fields: Date
Customer_Code Memo
But this causes me problems because I have to enter the time and the date
each time and I want it automatically to appear.
Also, I find I cannot update the table when I create a query joining my
Customer table with my CustomerInformation table so I can see which customer
the customer code relates too.
This has got to be easy..
Can someone help me get started please.
Cheers
Bon
 
C

Chaim

First change the name of field from Date to ContactDate or something
similar. The name of a field, table, query, form, etc. should provide some
insight in to what the object does or contains.

In your table definition, you should be able to set a default for your date
field as =Now(). This will provide the current date and time that the record
is created- when the new customer contact is made. You can if needed format
as desired.

Good Luck!
 
P

Peter R. Fletcher

There is some relevant discussion in an earlier thread ("How to
retrieve id of last inserted record...."). There are detailed
tradeoffs between using this approach and having the field set to
Now() in the BeforeUpdate Event of the form (or even in the
AfterUpdate Event of a specific control, whose contents you may be
specifically interested in.

First change the name of field from Date to ContactDate or something
similar. The name of a field, table, query, form, etc. should provide some
insight in to what the object does or contains.

In your table definition, you should be able to set a default for your date
field as =Now(). This will provide the current date and time that the record
is created- when the new customer contact is made. You can if needed format
as desired.

Good Luck!

Please respond to the Newsgroup, so that others may benefit from the exchange.
Peter R. Fletcher
 
Top