A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Automated button click



 
 
Thread Tools Display Modes
  #1  
Old May 28th, 2004, 11:16 PM
Gregory
external usenet poster
 
Posts: n/a
Default Automated button click

Hi,

I have a text box on a form. I would like a button that already exists on the form to be "clicked"(sendkeys) as many times as is reflected in the text box.

I think this is possible but I haven't been able to make it work.

Thanks in advance for your input.....
  #2  
Old May 28th, 2004, 11:49 PM
Ken Snell
external usenet poster
 
Posts: n/a
Default Automated button click

Why click the button? Why not just call the button's OnClick event's
subroutine the number of times you want it to run?

Private Sub txtBoxName_AfterUpdate()
Dim lngCount As Long
For lngCount = 1 to Me.txtBoxName.Value
Call cmdButtonName_Click
Next lngCount
End Sub


--
Ken Snell
MS ACCESS MVP

"Gregory" wrote in message
...
Hi,

I have a text box on a form. I would like a button that already exists on

the form to be "clicked"(sendkeys) as many times as is reflected in the text
box.

I think this is possible but I haven't been able to make it work.

Thanks in advance for your input.....



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:23 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.