Export access form to ppt

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #46
    From PM - Yours works, mine is using a large hammer on my head

    From PM::: I’ve removed the banging of head on wall sounds from the posts
    (@,,O)
    Originally posted by osmosisgg
    osmosisgg
    Both files are in the same folder. I can run macros on this computer (settings enables). (on a enterprise computer- that is)

    I changed zstrDatabaseNam e to my db name.

    I changed the lines to reflect a few of my fields in my table
    Code:
     zstrSQL = "SELECT [Liable], [Q]" & _
            ", [Question]" & _
            " From tbl_Archive_DQ " & _
            " Where( [Liable] = 'TAC'  );"
    Is this the right syntax? The [Liable] field is not a primary key- [z{O - admits and deeply regrets the lack of primary key, we'll not place her in the stockade today}]

    I left the .item as yours cause I was trying to minimally destroy/mutilate the code and figured it was just for my testing purposes. I want to add the other fields eventually.
    Code:
        Set zshape = theseshapes.Item("tbl_people_info")
    I changed zvEmail to zvLiable, zvLastname to zvQ, and zvFirstname to zvQuestion in the sub enterthenewreco rd.

    This is straight from the one posted yesterday that works EACH and EVERY time I try it, not like the past ones. Now that yours is working beautifully, mine reeks of [insert bad word here]. :/

    OK, I work for Honey and Chocolate... and I get to eat first BEFORE you give yourself the concussion.


    Let's take a look at that SQL string
    On the code line right below it type the following:
    Code:
    debug.print zstrSQL
    Run the slide show
    Run the BigI on slide3
    <ctrl><g> to open the immediate window.
    You should have something like:
    SELECT [Liable], [Q], ...

    Copy this text from the window
    Open your database
    Open a new query in design mode
    Switch to SQL view
    Paste your string
    Run (Click on the ! in the ribbon)
    See what happens

    Now, I cheat with the SQL, I build it using the visual editor when I can (^_^)

    So, build the query in Access so that it returns what you want, then switch to the SQL view and do copy, paste it into the PPTM vba code, place the quotes so that the string is formed correctly (remember: Text will need ' ' in the WHERE clause ie:
    Code:
    "SELECT ... FROM ... WHERE( "[FIELD]= 'searchtext');
    (SQL View: Open a query or start new, right click in an empty part of the the tables area, in the popup select sql view - there are other ways such as the ribbon and the applicaiton window bottom right corner icons)
    Last edited by zmbd; Feb 20 '14, 06:09 PM.

    Comment

    • osmosisgg
      New Member
      • Dec 2013
      • 51

      #47
      LOL! Thanks :) The last updated powerpoint by the wonderful zmbd worked. Upon trying to insert/update the same ppt with my data, it would not work. I updated one of my access db's to NOT use Q# (yeah one of many I created)- it doesn't work in VBA as mentioned in the above. In short, please pay attention to which one you update so you can reference the correct db data as I made the mistake of not referencing the appropriate updated db.

      Comment

      • zmbd
        Recognized Expert Moderator Expert
        • Mar 2012
        • 5501

        #48
        YEA! Now we only need to hear that your finished PPTM works and is also a work-of-art!

        -> No really, I think the next step is to get the SQL to be somewhat interactive, no? This was something talked about in the OP with the filter.

        My thought here, referring to my last PPTM_V3
        When the AB in Slide1 is clicked, the event will run the startup code that sets up the remaining application level events and connects to the database - but not the record set yet.

        Once the database is connected, there is the ability to create a form in the PPTM via the VBE. We can use this form; a combobox linked to one of the tables in your database as its row source, and then build our SQL for the record set based on the return just as any other parameter based query within Access.

        Once I get some things caught up this morning, I'll take a look at the situation.

        In the meantime, make a copy of my working PPTM.
        Open the VBE
        Menu>Insert>Use rForm

        The very familiar userform GUI editor opens
        Play around with the controls etc... so that when we start with the head-on-wall action again we'll be at least on the same wall...

        …haven't seen that chocolate nor honey yet... what, no express service? (^_^)
        Last edited by zmbd; Feb 21 '14, 01:47 PM. Reason: [z{typos}]

        Comment

        • osmosisgg
          New Member
          • Dec 2013
          • 51

          #49
          Originally posted by zmbd
          YEA! Now we only need to hear that your finished PPTM works and is also a work-of-art!

          -> No really, I think the next step is to get the SQL to be somewhat interactive, no? This was something talked about in the OP with the filter.

          My thought here, referring to my last PPTM_V3
          When the AB in Slide1 is clicked, the event will run the startup code that sets up the remaining application level events and connects to the database - but not the record set yet.

          Once the database is connected, there is the ability to create a form in the PPTM via the VBE. We can use this form; a combobox linked to one of the tables in your database as its row source, and then build our SQL for the record set based on the return just as any other parameter based query within Access.

          Once I get some things caught up this morning, I'll take a look at the situation.

          In the meantime, make a copy of my working PPTM.
          Open the VBE
          Menu>Insert>Use rForm

          The very familiar userform GUI editor opens
          Play around with the controls etc... so that when we start with the head-on-wall action again we'll be at least on the same wall...

          …haven't seen that chocolate nor honey yet... what, no express service? (^_^)
          Ok I will get familiar with it. I would like to avoid head banging- the 80s are over even though they were the best years lol.

          oh- oops you mean I wasn't suppsoed to eat the treats for you? hehehheeee

          Comment

          • zmbd
            Recognized Expert Moderator Expert
            • Mar 2012
            • 5501

            #50
            So I had thought combox and use the database table as the rowsource as one would do in Access; however, even with a late binding I can not get the combobox to work that way within PowerPoint :( .
            So, I'm still looking at this part of the project.
            In the meantime, at least you can hard code the query. (^_^)
            Last edited by zmbd; Feb 27 '14, 09:00 PM.

            Comment

            • osmosisgg
              New Member
              • Dec 2013
              • 51

              #51
              Sorry, been so busy this week. oh darn. I read some stuff on late binding it seems it's not that easy and folks seem to have issues with it. I believe in you :)

              Comment

              Working...