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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controlling buttons from program file

Status
Not open for further replies.

ShortyII

Programmer
Sep 8, 2003
57
NL
Hi,

The question is the following.
I have made a form called rj_edit2 and there i put some buttons on cmbUnit

Now i have a program file where i want to control the visibilety of the buttons.

But how can i reach the buttons on the form.

Normaly i use thisform. but this dosn't work because i'm not on the form.

If someone could please help me.
 
I played around a bit and managed to do it using:

_screen.ActiveForm.command1.Visible = .F.

Command1 is the name of the button.


However, I am not a big fan of this approach and unless there is a specific need for it I would stay away from changing the form in a program. It appears that could get real messy & tough to debug over time.



Jim Osieczonek
Delta Business Group, LLC
 
Thanx

It works fine.
I use it to disable controls at hand of the username and put it into a access lib i could do it into the screen but now i can reach it in one lib.

Thanx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top