ID codes for CommandBarButtons
When CommandBarButtons are added to a CommandBar in Access their
property defines their icon and their default behaviour:
Set myBar = CommandBars.Add(Name:="Customer", _
Position:=msoBarTop, _
Temporary:=True)
With myBar
.Controls.Add Type:=msoControlButton, Id:=539
.Controls.Add Type:=msoControlButton, Id:=4
.Controls.Add Type:=msoControlButton, Id:=644
.Visible = True
End With
Every button in the Access toolbar system has its own Id code but these
are the most useful:
Icon |
Id |
|
Description |
|
21 |
|
Cut |
|
19 |
|
Copy |
|
22 |
|
Paste |
|
|
|
|
|
539 |
|
New Record |
|
644 |
|
Delete Record |
|
|
|
|
|
210 |
|
Sort Ascending |
|
211 |
|
Sort Descending |
|
640 |
|
Filter By Selection |
|
605 |
|
Remove Filter/Sort |
|
|
|
|
|
247 |
|
Page Setup |
|
4 |
|
Print |
|
258 |
|
Send Email |
|
Your Access database will look more impressive if you add custom toolbars.
Read More
|
How to create backups automatically in FoxPro or Access using the Windows Scripting Host
Read More
|
Microsoft Access uses an American date format in SQL commands
Read More
|
How to backup an Access database using VBA and DAO
Read More
|
How to create a filename from a datestamp
Read More
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|