Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Datasheet will display as default (A2003)

    Hello All,
    I have an issue where I can't get a form to display in datasheet view by default. I have the default view in the properties set for datasheet but it always comes up as form view when it opens. I looked in the events for the form and can't see anything out of the ordinary. If I open the form the first time (displays incorrectly) and then save the form and open it again, all of a sudden it works. I am puzzled here.

    Thanks,
    Mark

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Datasheet will display as default (A2003)

    Do you open the form manually, from the database window, or using VBA code?

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Datasheet will display as default (A2003)

    Hi Hans,
    I open it by using the on click property of a button on another form. The weird part is that I can switch to design and run it again, sometimes it will come up as datasheet......

    Got any ideas?

    Thanks,
    Mark

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Datasheet will display as default (A2003)

    The On Click code for the command button probably uses DoCmd.OpenForm to open the form. This will open the form in form view by default, regardless of the Default View setting of the form. To open a form in datasheet view, use

    DoCmd.OpenForm "frmMyForm", acFormDS

  5. #5
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Datasheet will display as default (A2003)

    Thanks, That did the trick.

    Mark

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •