Michael said:
Hi Folks - Is there a way to set a custom toolbar and custom menu bar to
the database default, instead of setting the toolbar and menu bar
properties for each form? Thanks.
Run some code like (I adapted this code from something else that is working,
but as yet, this is untested):
Public Sub AddCustomToolbar()
On Error GoTo Error_Handler
Dim doc As DAO.Document
Dim db As DAO.Database
Dim frm As Form
'Dim ctr As DAO.Containers
Set db = CurrentDb
For Each doc In db.Containers("Forms").Documents
DoCmd.OpenForm doc.Name, acDesign
Set frm = Forms(doc.Name)
frm.Toolbar = "Name of custom toolbar"
DoCmd.Close acForm, doc.Name, acSaveYes
Next
Exit_Here:
Set doc = Nothing
Set db = Nothing
Exit Sub
Error_Handler:
MsgBox Err.Number & ": " & Err.Description, vbOKOnly, "Error"
Resume Exit_Here
End Sub