From: Barry Edmund Wright on 26 Apr 2010 11:21 Hi All, I have a subfrm on a form. When on the subfrm I can go to the Access Menu/View/Subform and switch between form and datasheet view. How do I do this using VBA? I see lots of similar posts pointing to: http://www.tkwickenden.clara.net/codeex/282.htm but that link is no longer available. Thanks for your assistance. Cheers, Barry
From: Barry Edmund Wright on 26 Apr 2010 12:19 On Apr 26, 11:21 am, Barry Edmund Wright <barry.edmund.wri...(a)witstoronto.ca> wrote: Thanks, figured this out: Under a button on the main form I simply put: If Form_subfrmClients2.CurrentView = acCurViewDatasheet Then '2 Datasheet View Me.subfrmClients2.SetFocus DoCmd.RunCommand acCmdSubformFormView ElseIf Form_subfrmClients2.CurrentView = acCurViewFormBrowse Then '1 Form View Me.subfrmClients2.SetFocus DoCmd.RunCommand acCmdSubformDatasheetView End If Cheers, Barry > Hi All, > > I have a subfrm on a form. When on the subfrm I can go to the Access > Menu/View/Subform and switch between form and datasheet view. How do I > do this using VBA? > > I see lots of similar posts pointing to:http://www.tkwickenden.clara.net/codeex/282.htm > but that link is no longer available. > > Thanks for your assistance. > > Cheers, > Barry
|
Pages: 1 Prev: writing table colum names to a text file on one line. Next: new security law in Massachusetts |