Time Stamp form open and close

  • Thread starter Thread starter KKruz
  • Start date Start date
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,
 
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
 
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
 
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
 
Back
Top