Fill in the time/date of when an entry was created

P

prana1

Hi all,

I have a form that is set up in data entry style which records information
from invoices that we receive. I would like to do the following:

1) record the date and time when data is entered and
2) record the date and time that a query pulls data from this table.

Anyone know what is the best way to do something like that?


Thanks all,

Eric in FL
 
K

KARL DEWEY

1) record the date and time when data is entered and
Use default of Now() for the textbox or field.

2) record the date and time that a query pulls data from this table.
Where would you be recording it?
 
J

Jerry Whittle

1. Easy. Create a Date/Time field in the table and make the default value
=Now().

2. Not so easy. A lot depends on what you mean by "pulls". If you mean
"pulls" as in "The manager pulls the pitcher out of the game", then the best
way is not to delete the record. Instead have a date field named something
like dtPulled. Fill in this field with code behind a form. You can get all
your active records with a query having criteria on this file like Is Null.
 
P

prana1

Makes sense...I did this for 1) and entered the default value of Now() and it
worked great. It now entered the date and time of when I input the invoice
information.

As for the other part, once I have entered a bunch of invoices I need to
prepare them to be sent (in a spreadsheet) to our accounts payable.

So I run a query that pulls all these together and prepares them as
spreadsheet, so I can email them off to be fed into SAP.

Then when I enter more invoices I need to do the same thing. How can I only
pull the new ones that were entered? The only thing that is consistent is
the fact that I run a query that batch them (sort of). I'd like a time/date
stamp on each record as well.

I figured out and was advised that I need 2 queries. A select qry to pull
the data, and an update or append qry to write back the date to a column
called processed on. I’m about ½ way there, as I have created the first qry,
and now need to know how to
Save it as a spreadsheet and then write back to the table the date and time
that they were pulled.
 
A

Aaron Kempf

of course.. if someone disables macros then this default won't work

yet ANOTHER reason you should use triggers and database side defaults..
instead of programming something with vba
 
P

prana1

Boy, the formatting changes whe I copy and paste it from Word...
I'm still new to Access. Triggers and side defaults... looked in the index
in my Access book. Not there. I think you mean using what Access has and
don't rely on macros... if this is the case, I do not see another way
though....
 
Top