Discussion Locked

How to hide control box in Access 2002

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Please, i urgently need a code on how to hide control box when a particular criteria is not meant. For example, if a function is to return 1 or 0, iif ([score]<=0, let it not return any value, to leave the place blank.

2 replies

by hkay

Some properties, such as CloseButton and ControlBox cannot be set at runtime. You could use this idea instead:

Private Sub Form_Close()
If intMyVariable = 1 Then
DoCmd.CancelEvent
End If
End Sub

This discussion is closed to new replies.