Hide Toolbar button

  • Thread starter Thread starter Remco
  • Start date Start date
R

Remco

Guest
Can someone explain me how to hide the toolbar button "Delete record" via VBA code when opening a form?
I'd like to do this so one can only delete a record via a commandbutton on a form.

Thnx Remco
 
I'm not sure how to customize the toolbar options from VBA. Since it is application dependent you'd probably need the handle to the application windows and would have to use some sort of API to handle this process. Again, assuming this is possible, you might also have to restart the application to change the effect.

Semi-workaround:
If you dont want the user to have access to the toolbars, you should turn off the Allow Full Menus option and create your database as an .MDE for front end users.
 
You can set the forms "Allow Deletions" property to FALSE if you do not want the user to be able to delete a record within the form.

Code:
 Private Sub Form_Open(Cancel As Integer)
[COLOR=Blue]     Me.AllowDeletions = False[/COLOR]
 End Sub
 
Last edited:

Users who are viewing this thread

Back
Top Bottom