Swith Datasheet to Form

D

DS

I need to switch a Form to Datasheet view from acommand button. No
problem, the problem is how do I switch a Datasheet view to a form view.
I don't have any Toolbars or MenuBars. Can I use a keystroke?
Thnaks
DS
 
W

Wayne-I-M

You could use the access autokey macro function

Create a new macro
Click Macro Name on the tool bar and put something like ^ABCDE
In the action column put the action you want - like change view
You could put the reverse (back to form) view against ^EDCBA

Or if you can you could put a button on your form and use

Private Sub NameOfButton_Click()
On Error GoTo ErrCmdDatasheet

DoCmd.RunCommand acCmdDatasheetView

Exit Sub


Then simply use the macro to get back to the form when you wanted. (the code
is not really need though if you set up the macro properly - but it's good
practice for me)

Hope this helps
 
Top