Enabling the "OpenPopUp" Command to fire on current record

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PATaylor
    New Member
    • Apr 2015
    • 4

    Enabling the "OpenPopUp" Command to fire on current record

    Can someone tell me where I've gone wrong? I'm working in a MS Access Web App. I have created a button that when clicked opens a filtered datasheet view of records. No problems yet.

    Here's the problem...once the filtered datasheet view is open, how do I enable the "OpenPopUp" command to open the current record in a particular view based on the value of a particular field?

    I hope I have provided enough details. Any help is much appreciated.
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    We must guess that you are using ACC2013... and what do you mean by "enable" the command is natively enabled in ACC2013?

    For ACC2013 here's the base reference:
    MS: OpenPopup Macro Action (Access 2013 custom web app)

    If you need more help than that, then you will need to provide more detail about your code (obviously MSA:Macro code in an ACC:WebApp as it does not support VBA), the SQL string, what you are expecting to happen, what is actually happening - including any errors (Title, number, AND text exactly as shown).
    Last edited by zmbd; Apr 28 '15, 08:45 PM.

    Comment

    • PATaylor
      New Member
      • Apr 2015
      • 4

      #3
      The base reference link unfortunately does not answer my question. I'm using Access 2013 for Web App, and I do know it differs in capability and syntax somewhat from the desktop version. I'll look for an option to pull the code. I'm using the "fill in the blank" form to build my parameters (which is clearly not working for me).

      Comment

      • zmbd
        Recognized Expert Moderator Expert
        • Mar 2012
        • 5501

        #4
        OK - I don't do a lot with Macros nor WebApps - they tend to be a bitt too finicky for my applicaions; however, if you can be patient with me I'll try to help you thru this bit.

        We'll need to see your macro at this point.
        Open the macro in design view
        select any one line in the opened macro
        <ctrl><a> to select all
        <ctrl><c> to copy to clipboard
        Return to this thread and click in the post box
        Click on the [CODE/] button in the toolbar
        Two code tags will be inserted into the post box, place your cursor between the the tags :
        [CODE]place cursor here[/CODE]
        <ctrl><v> to paste the macro script.

        Once you post the code, I may go in and format the script for easier reading depending on how MS formats the text to start with...

        There are some minor differences between how parameters are passed when used as a webapp vs desktopapp; however, this can be worked around once we have a better grasp of what you have already attempted.

        Comment

        • PATaylor
          New Member
          • Apr 2015
          • 4

          #5
          Since the macro is built within the view I cannot use the typical controls to copy and paste. I did save a couple screen shots https://s2temsc-my.sharepoint.com/pe...7c37943f8aefa0

          I hope this helps....and I sure appreciate your assistance.
          Last edited by zmbd; Apr 29 '15, 05:49 PM. Reason: [z{sorry, cannot open third-party sites right now}]

          Comment

          • AccessJunkie
            New Member
            • Apr 2015
            • 3

            #6
            Hi,

            When you use that syntax, what happens when you try it in your browser? Do you get an error?
            Is your view called 'Non Invoiced' based directly on a table or does it use a query as its record source?

            Comment

            • PATaylor
              New Member
              • Apr 2015
              • 4

              #7
              I do not get an error. The view called 'non invoiced' is a query view of a table. Using the current syntax, the popup window appears with the correct view, but instead of showing the record I am currently "clicked" on, the popup displays the first record in the table. I'm wondering if I need to write an independent macro than enable it for my filtered view. Any thoughts?

              Comment

              • zmbd
                Recognized Expert Moderator Expert
                • Mar 2012
                • 5501

                #8
                PATaylor:(...) the popup displays the first record in the table. I'm wondering if I need to write an independent macro than enable it for my filtered view. Any thoughts?
                + Most likely this has to do with the where conditional in your macro and how/if any parameters are being passed to the view.
                + Is your view based on an embedded query or one that is saved (... can you see it in the Access Application Navigation Pane along with the other queries and tables? )
                The where clause in the OpenPopUP requires that the query be a visible Access Object.

                Please try this again...
                Open your view/form, show the properties for the control that has your macro to open the popup, open the embedded macro as you would normally to edit it, please then follow the instructions I provided in Post#4 to post the macro here.

                -z

                Comment

                • AccessJunkie
                  New Member
                  • Apr 2015
                  • 3

                  #9
                  Hi,

                  If the Access 2013 web app view you are trying to open using OpenPopup macro action has a saved query as it's record source, then you must use the query name like this:

                  [FieldNameHere]=[NameOfQueryHere].[FieldNameInThat Query]

                  If you are using a table name, then substitute the actual table name in the appropriate spot.

                  One thing to note which sometimes trips people up is that this technique won't work if the view you are trying to open uses an Embedded Query as its record source. The reason for this is you have no way of knowing what the embedded query name is that Access creates behind the scenes for the Access 2013 web app view. (It's actually a GUID name behind the scenes.)

                  For your particular scenario try:
                  [NameOfYourQuery Here].[Type of Work]="Non Invoiced"

                  (I can't tell if there is dash between non and invoiced in your screenshot. Adjust as needed.)

                  Comment

                  Working...