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!

Making button disappear when criteria is met

Status
Not open for further replies.

PLiNk

IS-IT--Management
Apr 12, 2003
32
NO
I have a UNION query with two classes of records mixed. Leaflets and Papers. I can combine two classes of records into one query, but I would like to have a button that enables the user to access the leaflet to overlook the contents (papers) of this leaflet.
When the button is on every record shown, every paper and every leaflet, it will produce an error message when clicked upon if the paper does not belong to a leaflet, otherwise it will function as intended. How do I disable the button if ,say, (Belongs_to_leaflet_number IS NULL?
Thanks.

Jens

 
presumably somewhere on the form you have a bound control that defines whether its a leaflet / paper?

lets for example you have a text box called txtType, that says "leaflet" if a leaflet and "paper" for .... you guess paper

and the button you have is called btnInfo

in the on load event of the form put


If txtType.value = "Leaflet" then
btnInfo.enabled = false
end if

You could also use btnInfo.visible = false to hide the controls as oppose to just disableing it.

Hope that helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top