Results 1 to 12 of 12
  1. #1
    Join Date
    Mar 2005
    Posts
    18

    Question Unanswered: Open Two Files within Application

    Here is code to insert into a module then later call up the function in a macro:

    ---------------------------

    Function OpenSnapshotFile() As Boolean

    Dim stAppName As String

    stAppName = "C:\Program Files\Common Files\Microsoft Shared\Snapshot Viewer\SNAPVIEW.EXE C:\Report.snp"

    Call Shell(stAppName, 1)

    OpenSnapshotFile = True

    End Function

    -----------------------

    If I were to add another line to open up another another snapshot file I get two instances of the snapshot program. I tried using an "&" between the file names, such as "C:\Report.snp & C:\Report2.snp, but I only get the first Report to show up.


    How can I change this code to open up two snapshot files with only one Snapshot program open. The reason to open up two files at the same time is to tile them later under view and compare report numbers.

    Frosty
    (Frosty was taken, so hand to settle for FrostyFree)

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    why compare two reports manually (actually "visually")?

    Make another report that does the comparison: save your users some brain-strain.

    (and yes, i admit i avoided answering the question you asked!)

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Yeah - I had a go at this one earlier - I guess it is some simple snapshot automation but could I find a way to grab hold of the snapshot viewer? No is the predicable answer.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    What about the Snapshot Viewer Control ActiveX object? You could slap a couple of those on a form and let them view from inside your application...
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by Teddy
    You could slap a couple of those on a form
    Woah - steady with the technical jargon Teddy
    Testimonial:
    pootle flump
    ur codings are working excelent.

  6. #6
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    That's my "good-ol'-boy-with-lots-of-expendable-income-and-little-technical-know-how" potential client dialect. I've spent years perfecting its distinct nomenclature and subtle prose.

    *nod*
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  7. #7
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    hi Teddy,

    like Pootle, i also had a go. i also had a go with the snapview.ocx control, but i couldnt find any methods or properties worth setting.

    can you spread a little light?

    izy

    CLARIFICATION: i mean properties settable at runtime of course. static setting a target .snp is too boring
    Last edited by izyrider; 11-18-05 at 12:23.
    currently using SS 2008R2

  8. #8
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    You can set most of it's properties at runtime, including ".snapshotpath". I know intellisense doesn't indicate it as a property, you just have to try it.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  9. #9
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    TA!

    snpOCX.snapshotpath = "C:\blah\blah\mysnap.snp"

    interrrrrrrresting!

    izy
    currently using SS 2008R2

  10. #10
    Join Date
    Mar 2005
    Posts
    18
    Quote Originally Posted by izyrider
    Make another report that does the comparison: save your users some brain-strain.

    izy
    I thought about your words and am working on creating a query to take the data from one table and compare to another (I didn't build the tables, so I'm in the process of figure out where the data comes from). In the mean time, while I work on making the comparison query, please explain how the Active-X shown below works? I haven't formalized my training to use Active-X controls with Access.

    How does this work?

    snpOCX.snapshotpath = "C:\blah\blah\mysnap.snp"

    Frosty
    (Frosty was taken, so hand to settle for FrostyFree)

  11. #11
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    one form

    insert two snapshot.ocx (under Tools/ActiveX Controls as "Snapshot Viewer Control X.X")

    give each ocx a .snapshotpath in your code.

    izy
    currently using SS 2008R2

  12. #12
    Join Date
    Mar 2005
    Posts
    18
    Awesome, Izy!!!!! Awesome!!!!

    It works! Muuhaaaaaaaaaa!

    By the way, I created two queries that compares the totals from each other so the Snapshot previes are for those who actually want to see the report. The query is for myself.

    Thank you Izy for guidance and Teddy for the Active-X plug.

    Frosty
    (Frosty was taken, so hand to settle for FrostyFree)

Posting Permissions

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