Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2004
    Posts
    3

    Unanswered: open form from switchboard in datasheet view

    I created a form and set it as datasheetview when I tried to opened from the switchboard it opens in form view

    I tried to add the following code to the open form event but It's giving me object required error.

    Private Sub Form_Open(Cancel As Integer)

    Dim frm As [Form_Notice Data]
    Dim a As byte
    a = 2
    frm.DefaultView = a
    End Sub

    Thanks for any any help

  2. #2
    Join Date
    Apr 2003
    Posts
    280
    Quote Originally Posted by apcomptuer
    I created a form and set it as datasheetview when I tried to opened from the switchboard it opens in form view

    I tried to add the following code to the open form event but It's giving me object required error.

    Private Sub Form_Open(Cancel As Integer)

    Dim frm As [Form_Notice Data]
    Dim a As byte
    a = 2
    frm.DefaultView = a
    End Sub

    Thanks for any any help
    Why you don't want to open it up in form view?

    go to Tools>Database Utilities>Switchboard Manager and create it from there to save you the trouble.

  3. #3
    Join Date
    Aug 2004
    Posts
    3
    I Did It Like That, The Form Opens But Not In Datasheetview, The Purpose Of Opening In Datasheetview Is So The User Can Send It To Excel Or Do Queries Of The Data.

  4. #4
    Join Date
    Apr 2003
    Posts
    280
    Go to Tools>Startup then check Display Database Window.

    If you don't want it to display the database window everytime, just press f11.

  5. #5
    Join Date
    Aug 2004
    Posts
    3

    switchboard open form in datasheet view solution

    I found a solution to this problem, I am writting this in case someone comes up with issue.

    create a Module

    Function openform ()
    DoCmd.OpenForm "formname", acFormDS
    end Function

    In the switchboard manager instead of selecting open form call function

    function openform

    This will open the form in datasheetview from the switchboard

    Thanks

Posting Permissions

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