View Single Post
Old 07-31-2012, 12:55 PM   #6
rctjoe24
Newly Registered User
 
Join Date: Jul 2012
Posts: 28
Thanks: 0
Thanked 7 Times in 6 Posts
rctjoe24 is on a distinguished road
Re: timestamp when a button is clicked

Quote:
Originally Posted by umair434 View Post
that's what I tried before but timestamp always equals now().. the difference always turns out to be 0. Somehow I need to find the time when the button is clicked..Now() just shows the true time.
Maybe I'm not explaining this well enough and for that I'm sorry.

I'm starting to think that the form which contains the button to open the report is closed after you click it. For that reason the variable would be set to nothing. In addition if you don't explicitly dimension your variables with "Option Explicit" at the top of each module, it would assume the variable as a date and default it to current date?

Anyway, the best course of action is to add the variable I was speaking of, mdtmTimeStamp, to a module. When the report is finished running, DateDiff function will be looking at a date different than the current date/time.

rctjoe24 is offline   Reply With Quote