Check time of OnClick event

jon92

Registered User.
Local time
Today, 20:12
Joined
Sep 15, 2001
Messages
22
I have a button on a form - when the user has completed a certain task
they click the button, this logs the time and date task name etc.

The following code is attached to the onclick event:
CODE
Me.fldtasktype.Value = "Task description"
Me.fldtaskCode.Value = "xxx"
Me.fldUsername.Value = Environ("UserName")
Me.fldtaskDate.Value = Now()
DoCmd.GoToRecord , , acNewRec

I suspect some of the users may think it's fun
to click the button a few times instead of once !!

Is it possible to add to the above code, a routine that
will check the time of the first click event and ignore
any further clicks in the next - 30seconds (approx)?

any help would be appreciated
 
Why not disable the button after it has been clicked?

You will have to move the focus to another object before you can disable it. Then enable the button in another event [OnCurrent] or when needed.

Code:
Me.TextBox.SetFocus
Me.Button1.Enabled = False
 
Thanks ghudson

It works a treat
 

Users who are viewing this thread

Back
Top Bottom