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!

Make a command button invisible on a form based on one of its text box

Status
Not open for further replies.

teachmecr

Programmer
Oct 1, 2006
72
US
i have a form frmDataForm that has its record source property set to a view linked to SQL server(ODBC). The form has about 6 fields(textboxes). I have a command button on this form that opens up another form frmComments capturing some of Dataform values. What i want is to make this button invisible under certain circumstances i.e. I check forAssetnum of the Dataform value (which is unique in each case) to assetnum in a table called UserTable. If the Assetnum from the Dataform exists in the UserTable then i want my command button to be invisible, if it doesn't exist it should become visible and if a user clicks on it it opens up the form frmcomments. I'm not sure how to go about doing this..Thanks in advance
 
You will have to check the value "Assetnum" On Current Event of the form using Is Null/ Not Is Null then make the button desired style. Make sure you remove focus from the button before you hide/enable it.

________________________________________________________
Zameer Abdulla
Help to find Missing people
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top