Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query Design view context menus (XP)

    One user of a database has been on a basic Access training course, and wants to be able to create her own select queries. I'd like to keep the database secure - all of the checkboxes in the Startup window are unticked, and I'm using custom menus and toolbars. I can display a query in Design View for the user to modify, but of course the default shortcut menus are disabled.

    There are three standard query design view shortcut menus: Design View Field List, Design View General and Design View Grid. I'd like to enable Design View Field List and Design View Grid, but display a custom shortcut menu (which I've named "ambQueryContext") instead of Design View General. (This is so that the user can't change the query type to an action query).

    The query design view is shown, along with a custom toolbar, when the user clicks a button. What code can I add to the following to configure the shortcut menus as described? <div style="width: 100%; background-color: #FFFFFF;">DoCmd.OpenQuery "Bespoke Query", acViewDesign
    DoCmd.ShowToolbar "ambQueryDesign"</div hiblock>
    Waggers
    If at first you do succeed, you&#39;ve probably missed something.

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

    Re: Query Design view context menus (XP)

    I can't find any way to display a custom context menu in query design view.

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Query Design view context menus (XP)

    This is a common challenge for a database designer - we often get this kind of request from the person who is sort of the "administrator" of applications that we deploy. One strategy we have used is to create a separate front-end for that person to create whatever queries they want to, but we give them a special UserID that does not have permission to alter any data in the back-end. It isn't totally foolproof, but as long as they are relative novices, and you lecture them about the importance of not messing with the data it seems to work. The problem with the approach you suggest is that even with regular select queries, it may be possible to alter data and delete records. This prevents them from altering data and from deleting tables.
    Wendell

  4. #4
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query Design view context menus (XP)

    Another way is to provide them a form that allows them to create custom select queries...example attached...
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  5. #5
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks

    Thanks everyone; useful advice and suggestions all round.
    Waggers
    If at first you do succeed, you&#39;ve probably missed something.

Posting Permissions

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