Results 1 to 8 of 8

Thread: Menu help

  1. #1
    Join Date
    Aug 2005
    Location
    Delaware
    Posts
    139

    Unanswered: Menu help

    Hello;

    I want users to be able to export printed reports in Snapshot format to a location of their choice. Currently, in the MDE file they use, the menus are minimal and do not show the export option for reports. In the settings it looks like its all (Allow Full Menus) or not. Is there a way to allow users to see the Export option when a report is on the screen without allowing them access to the full menu options? i.e can I pick and choose which menu options I want them to see? If so, is this per form, or over the entire database.

    Thanks...

  2. #2
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    I would suggest creating your own tool bar that would have the button on it to do what you want. Then, you can reference that toolbar in each report that you want the users to be able to create a snapshot of. Put the name of the toolbar into the Toolbar property of the Report, on the Other tab of the property sheet for the report.

  3. #3
    Join Date
    Aug 2005
    Location
    Delaware
    Posts
    139
    Thanks, I'll give it a try.

  4. #4
    Join Date
    Aug 2005
    Location
    Delaware
    Posts
    139
    Hello;

    This worked, however it created another problem. In the MDE version (Production) the pop-up menu appears when the report is run as planned, but in the MDB (Test) it appears also, however the function menu that allows one to switch views from form view to design view while the report is still on the screen is gone. Is there a way to switch to design view in the test version while still maintaining the inability of the production users to have access to this function? For the time being I am just exiting the form and re-launching it in design view, so there is a work around for me if this issue can not be overcome.

    Thanks…

    Larry

  5. #5
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    You should be able to test the Name of the database your code is running in. This command will give you the database name:
    MyDBName = CurrentDB().Name
    Then you can test the last 3 characters of the DB Name to see if they are MDB or MDE. If it is MDE you know you are in the Production version and put the pop-up menu, otherwise, don't.

  6. #6
    Join Date
    Aug 2005
    Location
    Delaware
    Posts
    139
    Hello;

    Maybe I didn't explain enough. I know which DB is which, that's not the issue. I use the MDE for the users (what I call the Production version). I then have a MDB version (what I call Test) that I do all the programming and testing in. When I have programmed and tested an update, I copy (make an MDE) the Test version into the MDE version and release such to the users.

    When I am in the Test version, I would like to be able to have access to the menu that allows me to switch from form to design view, however because its really a non-restricted version of the production version, the alternate menu is in there which only allows the users access to export the report. They can not switch from form to design view - but neither can I. I have to exit out of the form, then relaunch it in design view to make changes. This is a slight hassle that I would rather not deal with if possible.

    Its looking like I will just have to put up with the hassle. The restricted user defined menu is only on a few reports, the ones the users utilize, not all reports. The rest of the reports (the ones which I did not activate the special menu per the recommendations below) work as one would expect.

    Thanks...

    Larry

  7. #7
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    Larry, I just re-read you post that preceeds my previous post. I thought I understood you correctly, and according to your post recent post, I do understand. It appears that you were (are?) looking for some way to know when the database is operating in "production" mode or "test" mode. It appears to me that your code can determine which mode it is in my checking the name of the database in which the code is running. That is, if the name ends in .mde it is the production mode, or .mdb it is the test mode. Now, with this in mind, I thought you would know what to do to obtain the ability to have access to the menu that allows you to switch from form to design view. So, rather than enabling the alternate menu, which is what you do for your users, either don't enable the alternate menu, or else disable the alternate menu. Because I don't know what method you are using to have this alternate menu available to the users, I can't suggest how to disable, or never enable it while in test mode. I sure hope this is clearer that I appeared to be the first time.

  8. #8
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    try this.
    different code runs in MDB, first run of MDE, second and later runs of MDE

    izy


    LATER: you might want to modify it a touch.
    in MDB I close the startup form and either run the 'cstInitialForm' manually, or start messing with the code.
    you can prettify this with a slightly different exit routine:
    Code:
    
    exit_Form_Load: ' tidyup and exit
        On Error Resume Next
        If lngAmIn = RunAsMDB Then
            Me.Caption = "Running in MDB"
            Me.capDescription.Caption = "You are running as programmer in MDB."
            Me.capTitle.Caption = "The Captain has the helm"
            strLog = strLog & "OK control will now be passed to the programmer" & vbNewLine
            Me.boxLog = strLog
            writeLog
            If MsgBox("Run the application?", vbYesNo + vbQuestion, "Ready!") = vbYes Then
                DoCmd.Close acForm, "frmStartup"
                DoCmd.OpenForm cstInitialForm
            End If
    Last edited by izyrider; 09-28-07 at 03:40.
    currently using SS 2008R2

Posting Permissions

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