Can any one tell me how to Diasble/Enable the Close button and the MinMax buttons programmaticaly ?
I have a form that can be opened via different paths in the database. Sometimes it is opened in datasheet view and sometimes it is opened in Form View.
When it is in datasheet view, I want to have the Close Button and the MinMax button.
But I don't want them in form view.
I have tried installing the following line of code on the On open event and even on teh On load evet but I keep getting a message that "YOU CAN'T ASSIGN A VALUE TO THIS OBJECT".
Is there any why to get this thing working? What am I doing wrong?
--------------------------
If Me.CurrentView = 2 Then
Me.CloseButton = True
Me.MinMaxButtons = 3
Else
Me.CloseButton = False
Me.MinMaxButtons = 0
End If
_-----------
thanks in advance,
ZaZa
I have a form that can be opened via different paths in the database. Sometimes it is opened in datasheet view and sometimes it is opened in Form View.
When it is in datasheet view, I want to have the Close Button and the MinMax button.
But I don't want them in form view.
I have tried installing the following line of code on the On open event and even on teh On load evet but I keep getting a message that "YOU CAN'T ASSIGN A VALUE TO THIS OBJECT".
Is there any why to get this thing working? What am I doing wrong?
--------------------------
If Me.CurrentView = 2 Then
Me.CloseButton = True
Me.MinMaxButtons = 3
Else
Me.CloseButton = False
Me.MinMaxButtons = 0
End If
_-----------
thanks in advance,
ZaZa