Create and add to a New Group
acCmdNewGroup, acCmdAddToNewGroup
I found this example in the microsoft.public.access.modulesdaovba newsgroup posted by somebody called Alex. It adds a new group to the database window.
'***************** Code Start *******************
Sub AddNewGroup(strGroupName)
SendKeys strGroupName & "~"
Application.RunCommand acCmdNewGroup
End Sub
Sub AddToNewGroup(strGroupName, strViewName)
DoCmd.SelectObject acServerView, strViewName, True
SendKeys strGroupName & "~"
Application.RunCommand acCmdAddToNewGroup
End Sub
'****************** Code End ********************