switching between sheet & form view

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

I'm trying to simplify switching between datasheet and form view with one
keystroke. In my code I have

DoCmd.RunCommand acCmdDatasheetView

or

DoCmd.RunCommand acCmdFormView
as the only line of code in a subroutine, tied to Alt-S.

I have a simple one field form to test it with - no other code.

When I try to switch in either direction I get the message

Run Time Error 2174
You can't switch to a different view at this time.

I've also tried doing this with a macro, that does nothing when I execute it
but doesn't return any error messages.

I can't find any more information on this error message or the command in
help or the knowledge base. Any help really appreciated
 
Richard,

Why not just click on the button on the toolbar? One of the
problems with the datasheet view is that it has no code
events that would let you switch back to form view.

Gary Miller
Sisters, OR
 
Back
Top