Rocky Smolin
rockysmolin at bchacc.com
Fri Feb 15 23:20:39 CST 2013
I don't know how to do that but I use the following code to toggle between continuous form and datasheet by creating two forms - subfrmPODetail and subfrmPODetailDatasheet: If Me.subfrmPODetail.SourceObject = "subfrmPODetail" Then Me.subfrmPODetail.SourceObject = "subfrmPODetailDatasheet" Else Me.subfrmPODetail.SourceObject = "subfrmPODetail" End If Me.subfrmPODetail.Requery Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Friday, February 15, 2013 9:05 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Force a form to open in datasheet mode Is there a command that I could use from within the form's code, such as in the Load or Open event, to force the form into DataSheet view? I've tried a couple of things but so far haven't got the right one. TIA, Arthur On Fri, Feb 15, 2013 at 6:39 PM, Stuart McLachlan <stuart at lexacorp.com.pg>wrote: > The default acViewMode for the VBA command DoCmd.OpenForm is acNormal. > > Try Docmd.OpenForm "frmMyForm",acFormDS > > -- > Stuart > > On 15 Feb 2013 at 18:15, Arthur Fuller wrote: > > > I forget how to force a form to open in datasheet mode. The default > > view > is > > already set to datasheet and the other views have all be set to No, > > but a simple call to DoCmd.OpenForm still opens it in Form view. > > > > This occurs only when I invoke the form from the default > > switchboard. If > I > > just open the form from the Objects pane it opens correctly. What's > > the difference? > > > > -- > > Arthur > > Cell: 647.710.1314 > > > > Prediction is difficult, especially of the future. > > -- Niels Bohr > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- Arthur Cell: 647.710.1314 Prediction is difficult, especially of the future. -- Niels Bohr -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com