Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    2

    Unanswered: Reports in Access

    I am trying to show reports in access using VB and would like to hide menu bar plus user should't be able to navigate to tables and other windows... he can only see reports preview...

    Have anyone done this? Please let me know if there's a way to achieve this?

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb

    You can do that throught the properties of the datatbase.

    i.e you can change the properties
    "AllowBuiltinToolbars", "AllowFullMenus", "StartupShowDBWindow" and "AllowSpecialKeys"
    to false

    Then if the user pressed F11 he will not be able to open the datatbase window, .... etc




  3. #3
    Join Date
    Oct 2003
    Posts
    2
    Thanks hammbakka...
    I couldn't find those properties but it did gave me a way how to do it...
    I use CommandBars an set all its collection item to false and allow only my toolbar to show up...
    This helped...
    Thanks !

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb

    Try to use this Function and call it from your program to enable/disable your properties:


    Function ChangeProperty(PropName As String, PropTyp As Variant, PropVal As Variant) As Integer
    Dim db As Database, prp As Property
    Const conPropNotFoundError = 3270

    On Error GoTo ERR_ChangeProperty
    Set db = CurrentDb
    db.Properties(PropName) = PropVal
    ChangeProperty = True


    EXIT_ChangeProperty:
    Exit Function

    ERR_ChangeProperty:
    If Err = conPropNotFoundError Then
    Set prp = db.CreateProperty(PropName, PropTyp, PropVal)
    db.Properties.Append prp
    Resume Next
    Else ' Unknown given property
    ChangeProperty = False
    Resume EXIT_ChangeProperty
    End If
    End Function

Posting Permissions

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