Time Stamp form open and close

K

KKruz

I have a form that is used to enter data. I have a time stamp for each entry
but would like to capture the data entry session for an immediate printout of
a report on the entries.

So,
Upon entering the form I would like to mark a variable with a time stamp,
allow the user to enter all they want, then when they exit the form, record
the end with a time stamp. I would then like these two time stamps to be
used to capture the data for a query then report.

Any suggestions on what would be the best place to start?

Thanks,
 
J

Jeff Boyce

It sounds like you are trying to save user-specific information, not
record-related data. In other words, you aren't looking to record
information about the specific record being entered, but about the
start/stop time for the user.

You'd need to have a table into which you'd store this...

You'd need code to run when the form was open (gathering who, when) and more
code running when it closes, and both code snippets writing to that table.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
K

KKruz

Unfortunately I had a feeling it would not be a piece of cake. Any ideas if
there are any sites that would have some code to play with along those lines?

Thanks,

Kurt
 
J

Jeff Boyce

Try searching on-line for something related to "logging users" or some such.

Here's a snippet of code I use to "log"...

strSQL = "INSERT INTO dbo_OA_ztblUseLog ( AppID, UserName, UseStart,
Version, VersionDate ) " & _
"SELECT 999 AS App, '" & GetUName() & "' AS UName, #" & Now() &
"# AS Start, '" & getSetting("Version") & "' AS version, #" &
getSetting("VersionDate") & "# AS vdate;"

CurrentDb.Execute strSQL, dbFailOnError

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top