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

only show control when filter is on

Status
Not open for further replies.

and

Technical User
Jan 16, 2001
67
GB
Hi everyone.

How do I do this?
My user chooses a value from a listbox on Form1, and Form2 opens showing only the record chosen. I have a button in my form footer that removes the filter to showAllrecords. This is fine. How do I hide the button when the user opens Form2 directly to show all records anyway?

Can you tell me how/point me in the right direction/link me to somewhere that will help?

TIA.

Andrew.
 
Try checking the Filter property of Form2 in the OnLoad event procedure. If there is a filter then this tells you that it is being opened through the Form1 process. Don't do anything to the button. But, if the Filter property is Null then put code in to either disable or make invisible the command button.

Let me know if that gives you a shove in the right direction.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top