Datasheet Form insists on showing in Form view.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ericks
    New Member
    • Jul 2007
    • 74

    Datasheet Form insists on showing in Form view.

    I have a sub Form that is in Datasheet mode. On my Main form I have a button that opens this form but then it shows in Form view. I set both the Default view and Allowed view options to Datasheet but that didn't help. This keeps me wondering why it shows as Datasheet when called directly but in Form view when called from the Main Form. I guess I need to add some code to the On click command of the button. Any suggestions?
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    I asume you're using DoCmd.OpenForm to open the form. When you open a form in this manner you have to specifically tell Access to open it in DataSheet View.

    DoCmd.OpenForm "Your Form", acFormDS

    Linq ;0)>

    Comment

    • Ericks
      New Member
      • Jul 2007
      • 74

      #3
      Originally posted by missinglinq
      I asume you're using DoCmd.OpenForm to open the form. When you open a form in this manner you have to specifically tell Access to open it in DataSheet View.

      DoCmd.OpenForm "Your Form", acFormDS

      Linq ;0)>
      Great, it works! But I find it bizarre that it doesn't show as Datasheet even when I clicked the 2 options but that additional code is needed. Which makes me wonder why these options are there in the first place.

      Anyway, thanks a lot.

      Comment

      • jwbird
        New Member
        • Jul 2007
        • 5

        #4
        It appears that the default DoCmd.OpenForm "Your Form" is SingleForm so to do something different you have to specify that as Linq outlined.

        Bird

        Comment

        Working...