Code Examples

Create and add to a New Group

acCmdNewGroup, acCmdAddToNewGroup 

I found this examle in the microsoft.public.access.modulesdaovba newsgroup posted by somebody called Alex. It addes 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 ********************

© 1998 - 2009 Terry Wickenden TKW Design Site developed maintained and hosted by TKW Design. This site is best viewed at 1024 x 768. Optimised for Firefox.