Subforms and Datasheet fun

  • Thread starter Thread starter fughidabowit
  • Start date Start date
F

fughidabowit

Guest
Hello all

Here is the situation: I have to hide the Access Menus but somehow enable users to display the DataSheet view for a subform within a form. What is the best way to do this---and how would I go back from the DataSheet view to the normal view??

*I cannot simply open the form in a new window - it must stay within the other form (unfortunatelly)

*I have tried the DoCmd.RunCommand acCmdSubformDatasheet command with no success: "THe command or action 'Subformdatasheet' isn't available now"

Thanks in advance!
 
I don't think you can change the subform view "on the fly". Set the subform to Datasheet view from the beginning. Read this article on what you can do with datasheets in code:
You Can Do That with Datasheets?
 
It will work with the runcommand, but you should use 'acCmdSubformDatasheetView'
Maybe you should first set the focus to your subform:
Code:
Me!subMySubform.SetFocus
DoCmd.RunCommand acCmdSubformDatasheetView

Pat, why shouldn't that be possible if it's available in the default popupmenu?
 

Users who are viewing this thread

Back
Top Bottom