Command Button

  • Thread starter bootybox via AccessMonster.com
  • Start date
B

bootybox via AccessMonster.com

I have a command button that has on the OnClick property it raises the valu
of a field by one. I would like the option of holding the command button
down to do a rapid increase of the field without having to increase the field
oe click at a time. Any help appreciated.
Thanks
DS
 
F

fredg

I have a command button that has on the OnClick property it raises the valu
of a field by one. I would like the option of holding the command button
down to do a rapid increase of the field without having to increase the field
oe click at a time. Any help appreciated.
Thanks
DS

Code the command button Click event:

[ControlName] = [ControlName] + 1
DoEvents

Set the command button AutoRepeat property to Yes.
 
M

Marshall Barton

bootybox said:
I have a command button that has on the OnClick property it raises the valu
of a field by one. I would like the option of holding the command button
down to do a rapid increase of the field without having to increase the field
oe click at a time.


The only thing I can think of is to set the button's
AutoRepeat property to Yes.
 
B

bootybox via AccessMonster.com

Thanks Fred, I tried the auto repeat but it did it with wild abandon. I
didn't really have any control of it going one by one. I've seen this done,
much like the clock in control panel. Or is this a non-Access thing.
Thanks
DS
I have a command button that has on the OnClick property it raises the valu
of a field by one. I would like the option of holding the command button
down to do a rapid increase of the field without having to increase the field
oe click at a time. Any help appreciated.
Thanks
DS

Code the command button Click event:

[ControlName] = [ControlName] + 1
DoEvents

Set the command button AutoRepeat property to Yes.
 
J

JethroUK©

use spin buttons instead (specifcally designed for this job) - these will
also give you a chance to scroll back - when you inevitably scroll too far
 
J

John Nurick

You can slow it down by using the form's Timer, although this doesn't
give a smooth tick-tick-tick:

Dim blButtonWait As Boolean

Private Sub Command20_Click()
If Not blButtonWait Then
Me.TimerInterval = 60
Me.txt1.Value = Me.txt1.Value + 1
blButtonWait = True
End If
DoEvents
End Sub

Private Sub Form_Timer()
Me.TimerInterval = 0
blButtonWait = False
End Sub



Thanks Fred, I tried the auto repeat but it did it with wild abandon. I
didn't really have any control of it going one by one. I've seen this done,
much like the clock in control panel. Or is this a non-Access thing.
Thanks
DS
I have a command button that has on the OnClick property it raises the valu
of a field by one. I would like the option of holding the command button
down to do a rapid increase of the field without having to increase the field
oe click at a time. Any help appreciated.
Thanks
DS

Code the command button Click event:

[ControlName] = [ControlName] + 1
DoEvents

Set the command button AutoRepeat property to Yes.
 
D

DS

John said:
You can slow it down by using the form's Timer, although this doesn't
give a smooth tick-tick-tick:

Dim blButtonWait As Boolean

Private Sub Command20_Click()
If Not blButtonWait Then
Me.TimerInterval = 60
Me.txt1.Value = Me.txt1.Value + 1
blButtonWait = True
End If
DoEvents
End Sub

Private Sub Form_Timer()
Me.TimerInterval = 0
blButtonWait = False
End Sub



Thanks Fred, I tried the auto repeat but it did it with wild abandon. I
didn't really have any control of it going one by one. I've seen this done,
much like the clock in control panel. Or is this a non-Access thing.
Thanks
DS
I have a command button that has on the OnClick property it raises the valu
of a field by one. I would like the option of holding the command button
down to do a rapid increase of the field without having to increase the field
oe click at a time. Any help appreciated.
Thanks
DS

Code the command button Click event:

[ControlName] = [ControlName] + 1
DoEvents

Set the command button AutoRepeat property to Yes.
Thanks John,
I'll give it a spin :)
David
 
D

DS

JethroUK© said:
use spin buttons instead (specifcally designed for this job) - these will
also give you a chance to scroll back - when you inevitably scroll too far


I have a command button that has on the OnClick property it raises the
valu

of a field by one. I would like the option of holding the command button
down to do a rapid increase of the field without having to increase the
field

oe click at a time. Any help appreciated.
Thanks
DS
Thanks Jethro,
Where can I get these spin buttons?
DS
 
J

JethroUK©

DS said:
JethroUK© said:
use spin buttons instead (specifcally designed for this job) - these will
also give you a chance to scroll back - when you inevitably scroll too far



Thanks Jethro,
Where can I get these spin buttons?
DS

choose more tools from the toolbox

Microsoft Form SpinButtons
 
D

DS

JethroUK© said:
choose more tools from the toolbox

Microsoft Form SpinButtons
Thanks, but that is ActiveX and I've heard some bad things about
ActiveX. Any way of building spin buttons without ActiveX?
Thanks
DS
 
F

fredg

Thanks Fred, I tried the auto repeat but it did it with wild abandon. I
didn't really have any control of it going one by one. I've seen this done,
much like the clock in control panel. Or is this a non-Access thing.
Thanks
DS
I have a command button that has on the OnClick property it raises the valu
of a field by one. I would like the option of holding the command button
down to do a rapid increase of the field without having to increase the field
oe click at a time. Any help appreciated.
Thanks
DS

Code the command button Click event:

[ControlName] = [ControlName] + 1
DoEvents

Set the command button AutoRepeat property to Yes.

Dim lngX As Long
[ControlName] = [ControlName] + 1
For lngX = 1 To 55555555
Next lngX
DoEvents

Want it a bit faster, change 55555555 to a lower value (i.e.
33333333); a bit slower change it to greater value.
Actual speed will depend upon your computer processor speed.
Experiment.
 
D

DS

fredg said:
Thanks Fred, I tried the auto repeat but it did it with wild abandon. I
didn't really have any control of it going one by one. I've seen this done,
much like the clock in control panel. Or is this a non-Access thing.
Thanks
DS
I have a command button that has on the OnClick property it raises the valu
of a field by one. I would like the option of holding the command button
down to do a rapid increase of the field without having to increase the field
oe click at a time. Any help appreciated.
Thanks
DS

Code the command button Click event:

[ControlName] = [ControlName] + 1
DoEvents

Set the command button AutoRepeat property to Yes.


Dim lngX As Long
[ControlName] = [ControlName] + 1
For lngX = 1 To 55555555
Next lngX
DoEvents

Want it a bit faster, change 55555555 to a lower value (i.e.
33333333); a bit slower change it to greater value.
Actual speed will depend upon your computer processor speed.
Experiment.
Thanks Fred, Sounds good, I'll give ut a try.
DS
 
Top