Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

KeyPress

Status
Not open for further replies.

Dina01

Programmer
Mar 26, 2002
204
CA
Hello,

I have a continuous form and what I would like to do is that in the Timer event, after the textbox that I specified refresh I would like my button named BtnHide to be automatically pressed, without having to click with my mouse....

Is this possible...
 
Sure it’s possible. You should have an on click event defined for BtnHide which hides something you want to hide. When your timer fires and you know you want to do the hide, call the on click routine from your timer event. Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Hey Robert,

I am not to osure what I am doing wrong but here is my code for the Timer Event..

Private Sub Form_Timer()

Me.DataID.Requery
Me.Evenement.Requery
Me.Categorie.Requery
Me.Descriptions.Requery
Me.Lieux.Requery

Me.cmdHide.OnClick

*************
What I need is that everotme the form refresh the cmdHide button is clicked automatically...
 

Close, but not quite

Change me.cmdhide.click to

Cmdhide_ Click()
Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Ok, I changed it to Cmdhide_ Click()

Robert Berman
, but now I get an error message that the sub or function is not defined..
 
1) Is your command button on the same form your timer event is on.
2) If it is change the on click event procedure from Private to Public.
3) If your timer is on another form than your command button, post back. Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Hey Robert,

1. Yes the command Button is on the same form
2. I did change the event procedure to Public.

But I still get the same error
 
OK, then probably we are using the wrong name. Open your form in design view. Click on the button, click on properties, click on events. You should have an on click event specified and it should be an event procedure (not a macro). Click on the elipse (…) button. That should bring up the code. What is the name of the procedure? Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
This is the name of the procedure

Public Sub cmdHide_click()




Thanks in advance
 
I have ran into this a few times...
Try changing the line to:

call Cmdhide_Click()


HTH!

-Brad
 
Hello Brad,

Thanks that worked fine........
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top