[AccessD] Force a form into a particular mode.

Rocky Smolin rockysmolin at bchacc.com
Fri Mar 15 00:03:48 CDT 2013


Well this may be cheating but I have a button on my PO form which switches
the PO Detail (which is in a sub-form) from continuous to datasheet and I do
this by having two sub-forms one of each format and switchback and forth as
the button is clicked:

The OnClick event of that button:

    If Me.subfrmPODetail.SourceObject = "subfrmPODetail" Then
        Me.subfrmPODetail.SourceObject = "subfrmPODetailDatasheet"
    Else
        Me.subfrmPODetail.SourceObject = "subfrmPODetail"
    End If
    Me.subfrmPODetail.Requery

It would seem that you could use the me.DefaultView property but I think I
tried that and it wouldn't work.  

This solution seemed expedient.

But if you have a form that you want to open in datasheet and never change
it, why not just set the default view to datasheet in design mode and save
it?

IOW - what problem are you trying to solve?

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: Thursday, March 14, 2013 7:52 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Force a form into a particular mode.

I want to guarantee that the form opens in datasheet mode, even if that is
not specified in the OpenForm call. I would also like (perhaps) to know the
constants associated with whatever property it is that you change.

TIA,
A.


On Thu, Mar 14, 2013 at 9:37 PM, Charlotte Foust
<charlotte.foust at gmail.com>wrote:

> Give us a hint.  What mode are you talking about?
>
> Charlotte
>
> On Thu, Mar 14, 2013 at 6:12 PM, Arthur Fuller 
> <fuller.artful at gmail.com
> >wrote:
>
> > I can't remember how to do it. I want to put it in the form-open or 
> > form-load event.
> >
> > TIA,
> > --
> > Arthur
> > --
> > 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



More information about the AccessD mailing list