From: Mike Turner on 2 Mar 2010 15:58
Jon, BruceM and Paul: Many thanks for your answers. I will now experiment
with your ideas.
"Paul Shapiro" wrote:
> "Mike Turner" <MikeTurner(a)discussions.microsoft.com> wrote in message
> > My Uncle has an Access application where he would like to sometimes switch
> > from a Form's Form View to Data sheet view and back. He would like certain
> > settings for each view (eg form maximisable when in Data Sheet view but
> > not
> > when in Form view,and certain fields hidden in data sheet view but visible
> > in
> > text boxes in Form view. So,is there an event which is fired when the
> > form's
> > view style is being changed,so that I could put appropriate coding there?
> > Either Access 2003 or 2007 could be used,preferably 2003.
> > I realize I could put a button on the form in form view, say,where I could
> > put code that handled any changes needed from Form view to Datasheet view
> > but
> > it seems it would not be there when moving back form Data sheet view to
> > Form
> > view!
> I've done something like that to change the mode of a subform using a button
> on the main form. That way the button is always available, even when the
> subform has been switched to datasheet mode. If you're working with a single
> main form, you could make that form a subform of an unbound main form that
> just has the mode switch button.
> You might be able to do something with a custom right-click context menu for
> the form, but I haven't tried it.