Results 1 to 14 of 14
  1. #1
    Join Date
    Mar 2004
    Location
    California
    Posts
    502

    Unanswered: Image CP Active X Control & Access 2003

    First off let me ask exactly what is an Active X control? There is surprisingly little information that I can find on it.

    The above titled X control is for viewing image files in Access and I suppose in other programs also.

    I can't find any help on this specific Active X.

    My need is for multiple images on an Access 2003 report.

    Can anyone shed some light on this for me please.

    Still fighting with linking pictures to an Access report page.

    Thanks.

    Rick

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Rick,

    I seriously wouldn't advice this method. It can open up a whole new set of problems, especially if you're not familiar with activeX controls and ESPECIALLY with what I know you're trying to do.

    Did you re-read the previous threads you posted on this topic??? As well as the latest replies?

    ActiveX controls can be problematic (with what you intend to try and use it for) and you'll most likely have more headaches than if you simply used the advice I (and Teddy) posted in your original posts!

    I don't understand why you simply refuse to believe someone who has been doing this for over 25 years as well as Teddy who also has many, many years of experience.

    Perhaps you should seek help elsewhere if you won't believe the advice we give you on this site.

    Plain and simple - what you are trying to do is highly not advisable and mainly for advanced users (and will unlikely work!) Again, re-read the posts where we supplied you the BEST route to go.

    Moderators can get frustrated to and I have to say I'm a bit frustrated that you simply ignore (not only my advice) but the advice by another highly qualified moderator.

    Please re-read these posts very carefully!!!!! http://www.dbforums.com/microsoft-ac...to-report.html Perhaps you need several other moderators and users to explain to you the exact same thing and WHY you're going to have problems! Or I might suggest you actually contact the MLS web developers so they can again, explain to you the exact same thing.
    Last edited by pkstormy; 04-16-10 at 02:59.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Mar 2004
    Location
    California
    Posts
    502

    Active X Desperate

    I'm aware of the dangers of Active X but am desperate to get this completed as it's my last task on the report page that's holding up a very important presentation.

    I can read what you and teddy have suggested but it's beyond me on how to put it together.

    I don't know where to place code and what code to use. I barely understand VBA.

    Over the years I have received much help from this forum and am very grateful for that. It's why I keep returning here.

    The downside of exchanging words on the Internet is that we don't talk to one another anymore. All of the human interface is missing and miss interpretation is rampant. For that I am sorry.

    Thanks pkstormy

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Go have a look at the reference implementations on the RETS site. That's where I found myself when trying to get a handle on this same question.

    To be brutally honest, it may be worth either making a dedicated effort to pick up VBA, or to outsource the project. Your time has a value and it may very well be that you are losing profitability by trying to finagle this yourself.
    oh yeah... documentation... I have heard of that.

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

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Rick,

    If the suggestions in the previous post were a bit confusing, I think you'll find it much more difficult working with ActiveX controls. Working with these is not as easy as the suggestions I supplied. ActiveX controls are often difficult to work with and not a simple matter of putting the activeX control on the form/report and it does what you want it to do. There's other things involved such as registering some activeX components, making sure you have the correct References, and programming the activeX involved which again, will most likely be a lot more difficult than the suggestions in the previous postings.

    I didn't mean to sound harsh and I'm glad you keep coming back to this site for suggestions (and I'm pretty sure you understand that we're all volunteers on this site but most of us are full-time developers with many years of experience). I was giving you the easiest methods to utilize to do what you want to do without the need to get deep into vba coding.

    Saving the pictures themselves into the table will be the easiest method without any vba coding (although typically not recommended for large-scale type projects and 800 some pictures will bloat your mdb extensively.) But any other method you research will end up requiring some vba coding that will be more at an intermediate or advanced level. If you need to get this done quickly for a presentation, please consider this option (but again, it's typically not recommended for a lot of pictures such as you need.)

    Otherwise, honestly, I personally think the easiest approach you could take would be to disregard the reporting aspect with the pictures and use the internet URL website coding. If possible in the download, ask and see if they can supply the URL address in the data download for each MLS, save it in a field in your table, and then use the 2-3 lines of coding to open the website directly. Then as Teddy previously mentioned, you don't have to worry about out-dated pictures (or other information.)

    If not either of the 2 above, consider storing the folder/filename in the table. This is the next easiest option (but might be tricky coding into a report).

    After that, the coding to grab all pictures which have part of the MLS# in the file name or folder name (which is the route I'd go but I've done things like this several times in the past.) Again though, this would be tricky to get these pictures into a report.

    Embedding multiple jpg pictures in a report automatically linking to the correct MLS# is not as easy your thinking especially given what you want to do (again, not just with MSAccess but with any program.) Although MSAccess IS the easiest program versus others to do it with (but you won't get around learning vba to a fair amount unless you were to store the actual picture or folder/filename with the MLS record.)

    Have you considered hiring a local developer to do this? I really think you're going to struggle with this regardless of the approach you take unless as Teddy mentioned, you're willing to devote the time to learning vba (which is not something you learn within a day or two.) Even if you took a few MSAccess classes, you'd still be struggling with this since it's not at a beginner's level.

    Also keep in mind the time your devoting to trying to find a work-around solution to what has already been suggested. I've seen posters spend weeks/months trying to find another solution (not believing us) only to eventually realize that if they instead spent the time looking at what we suggested in these posts (by those of us who have already struggled with the same concepts), they would've saved themselves a lot of extra researching time. They could've used that time wisely by following our guidelines. I just really hate to see you keep struggling and wasting your time trying to find a work-around solution only to reach the same dead-end.

    I've seen many, many posts where the poster will come back and say "Your original advice was too complicated so I've researched this or that, now what if I did this..." only to find that the method they think is going to be easier, ultimately ends up being a complete waste of their time because when we respond "Ok, now you'll need to do this and this and this... using your new discovery", that they end up getting frustrated again. It becomes a cycle which eventually leads back to what we originally suggested.

    But I've also seen posts (although rare) where the poster found another method which (even though it's the more complicated, time-consuming, and prone to future problems way of doing it), was actually easier for the poster to understand.
    Last edited by pkstormy; 04-16-10 at 22:32.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  6. #6
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Rick,

    Here's a program I developed which automatically searches for picture files (or other file types) and then stores their folder/filename in the table: http://www.dbforums.com/6291638-post40.html (hold down the shift key while opening to see the code behind the scenes).

    It's a nice little routine I wrote a few years ago but again, a somewhat advanced level of coding. I wanted to show you it just so you could see how something like searching and automatically grabbing all pictures from a folder could work and don't expect you to understand all the coding involved. (but it gives you an idea on what it takes.) Click the 'Admin Populate' to specify the file type and populate the table with the file type you specified (note: this is an MSAccess 2003 mdb and has not been tested with 2007 so it may not work with 2007 since it uses specially designed functions and API calls.)

    Ignore all the bad and bold type coloring I used on the form - I'm not very color-coordinated and a little bit color blind (not to mention that MSAccess doesn't have a lot of nice colors to choose from.) (also note that EDP is my consulting company name).

    Also, don't be alarmed that it doesn't look like MSAccess. I designed this as a stand-alone popup form so it doesn't show the MSAccess background and menus (but it's still MSAccess).
    Last edited by pkstormy; 04-16-10 at 19:50.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  7. #7
    Join Date
    Sep 2006
    Posts
    265
    Forgive my ignorance but I don't know anything about RETS howvever I treat Images just like a bit of data, the only difference is referentially accessing the images. I don't know the acquition process to get the images, XML file formats? Or is it a matter of knowing how many images you have acquired. Can you store each reference in a table along with the Identifier or is there more to it?

    I use an ActiveX application called dbpix and I have used this since Access 1997. Whilst this may not be appropriate it was the only way I could get images into Access. I only need one image pre record although there is a facility to see an alternative image.

    Look at ammara.com web site starting from here:

    Access Master-Detail Image Form


    Simon

  8. #8
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    There's a little more to it Simon. You haven't been privey to the previous posts Rick and I have been discussing on how to automatically grab jpg files in a folder and somehow get a report to recognize what images to grab based upon the 'MLS#' field value in the table.

    Looking at the link you supplied (correct me if I'm wrong), but this is again down the same lines that Rick and I have been discussing where the actual images are either stored in the table "embedded" or the folder (and/or) filename is stored in the table "linked". Rick - this might be a good option if you possibly stored the images associated with each MLS# in a 'separate' folder that's named the same as the MLS# (which I'd recommend as in my 2nd post in the other set of threads).

    Thanks for the link Simon. If you're interested, here's where the topic started: http://www.dbforums.com/microsoft-ac...to-report.html

    Feel free to chime in again with more suggestions after reading the posts in the link.
    Last edited by pkstormy; 04-17-10 at 00:07.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  9. #9
    Join Date
    Sep 2006
    Posts
    265
    I do realise that this thread is a continuation however if you embed the images into a table you could potentially end up with records PhotoY494872-1 to PhotoY494872-24. Are you intending to render all these images to the report?

    I also notive that the RETS standard is XML and you may find more about this acquistion of information using importing XML into Access. I only export XML so I haven't investigated importing information.

    Simon

  10. #10
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Simon,

    This concept is still the same as one of the following I previously posted:

    1. Import the jpg pictures themselves into an OLE Object field in the MSAccess table (which is typically not recommended but an option.)

    (this is the same concept as what you stated here: "I do realise that this thread is a continuation however if you embed the images into a table you could potentially end up with records PhotoY494872-1 to PhotoY494872-24." or this mixed with method #3 below.)

    2. Create fields in the MSAccess table to tell it where to grab the correct jpgs (ie. you store the foldername/filename of the pictures in fields in the table.) This is most likely the same 'kind' of method the website itself uses to return the correct pictures to the web page. It's typically the method used.

    3. Write code which utilizes a common value (ie. MLS #) to identify that record with part of the jpg filename itself (ie. MLS # = 494872 and you want to grab all pictures which have 494872 as part of the jpg file name in a specific location.)

    Whether it be an xml or other type, the concept and point of the original discussion is that you cannot have MSAccess (or any other program), automatically look within a jpg picture and grab information from within that picture to know which MLS# record it links to. It is impossible (again, regardless of the program used, activeX control used, or WHATEVER, etc...etc..), to look within a jpg picture and grab a 'field' to identify that picture with some record in a database.

    Even if an activeX control (of any kind) is used, there has to be 'some' kind of coding to tell it where and what jpg filenames to utilize, whether it be coded within the activeX control somehow or written in vba coding. (ie. you could tell it to grab all picture files from a specified folder where the folder name itself is named the same as the MLS# which is the same concept as #3 above or the example I posted here: http://www.dbforums.com/6455941-post5.html in the previous threads.)

    For example, I can most assuredly say that the activeX control you utilize does not automatically know where and what picture files to grab without telling it either the folder name to grab all the files to use or some part of the actual file names themselves. EXAMPLE: If an MLS# = 12345 and you have pictures in a folder name called: 12345, you could code it to grab all pictures within folder 12345. But if folder 12345 has 800 pictures in it, some of them associated with another MLS#, you cannot tell it to automatically distinguish which pictures to use UNLESS you code it to use SOME part of the filename itself (ie. grab all pictures in folder 12345 (or folder ABC or folder XYZ) which have 12345 within the filename itself.)

    An xml type would be same as the last comment that I posted here: http://www.dbforums.com/6456031-post8.html (since xml imports/exports contain schema data about the data itself.)
    ie..
    "Now with certain types of files there can be 'tags' associated with that picture file (but not in the actual picture itself) to identify that picture to then be used to link it to a specific record but again, this concept is STILL the same as #2 above and you would not be able to use any kind of 'tag' within your jpg downloads (even if you could identify a 'tag' (such as listingID or MLS#) associated with a picture, you'd STILL end up storing the folder/filename as described in #2.)"

    The one thing I can say with certainity within these threads is that I'm not explaining myself well enough to get this point across. Again, I'm trying to save Rick time trying to research methods which will eventually lead him back to the same point I'm trying to get across in all these threads. There's simply NO easy 'other' method versus what I've been saying again and again in all these posts.
    Last edited by pkstormy; 04-17-10 at 20:36.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  11. #11
    Join Date
    Sep 2006
    Posts
    265
    If your database uses the MLS reference as an unique Identifier surely you can extrapolate the file names of the jpeg images and then acertain how many images are associated with that MLS.

    I understand from this thread that Rick wants to get images into his report.

    Whatever you use don't avoid OLE for jpegs, they are inefficient you might as well go back to the chisel and stone. They are not called Objects as Large as Elephants for nothing.

    Forgive me if I seem confused, however having accomodated 16,500 images I'm having difficulty understanding something that should be an integral part of Rick's application.

    Simon

  12. #12
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Simon,

    You don't understand (I recommend reading all the previous posts). Rick wants to download 800 jpg pictures into 1 specific folder (any folder where ALL the MLS pictures are mixed within that folder - for example, ALL 800 MLS jpg pictures are saved into c:\MyMLSPics). He then downloads the MLS data file which has the MLS #'s (NO other data telling it what pictures are associated with that MLS# other than the JPG filenames in the folder contain the MLS# such as MLS2234-1.jpg, MLS2234-2.jpg, MLS4444-1.jpg, MLS4444-2.jpg, etc...etc..) AGAIN, all mixed into 1 folder which again, have jpg filenames such as MLS3433-1.jpg, MLS3433-2.jpg, MLS1234-1.jpg, MLS1234-2.jpg, etc...etc...etc..) He then wants to open a report and have it AUTOMATICALLY know which specific jpg pictures to grab (WITHOUT ANY CODING AND WITHOUT SAVING 'ANY' INFO ON THE JPG FILENAMES in the table or creating specific MLS FOLDERNAMES) which are associated with that MLS# value on the report.

    If you know of some magical way (WITHOUT CODING, LINKING, or EMBEDDING) where on the report, it can automatically search through all the jpg pictures in c:\MyMLSPics when the report is opened and again, automatically know which jpg pictures (and how many) are associated with each MLS# (AGAIN - WITHOUT CODING, Linking or embedding!!), then please, give your suggestions.

    To add to the complication, there may be 2-3 jpg pictures associated with MLS#2334 while there may be 4-5 pictures associated with MLS#4445. Again, ALL in the same folder and the report needs to AUTOMATICALLY know which JPG pictures are associated with a specific MLS# (and AGAIN, WITHOUT coding, LINKING, EMBEDDING involved!)

    1. The jpg pictures themselves are NOT saved into a field in the table for the specific MLS#. Only ALL OF THEM are saved (and mixed) into ONE single folder.
    2. LINKS to the JPG pictures are NOT saved into ANY field in the table for the MLS#.
    3. Rick DOESN'T want to go the route of saving the MLS pictures into separate folders where the folder is named with the MLS#.
    4. Rick DOESN'T want to save the actual jpg picture folder/filenames into a field into the MLS record in the table.
    5. Rick DOESN'T want to WRITE 'ANY TYPE' of CODE to grab specific jpg pictures which have the MLS# within the FILENAME itself (or EVEN grabbing ALL pictures within a specific folder where the folder name is named as the MLS#).

    *6. Rick is currently thinking there is some 'magical' activeX control or other method which can look at the MLS# in the data table and AUTOMATICALLY search through c:\MyMLSPics and embed (or link) the associated jpg pictures into the report that are associated with that MLS# (AGAIN, ONLY using the MLS# in the data file and NOTHING involved with the ACTUAL jpg FILENAME OR ANY CODING INVOLVED, or saving the link to the folder (or filename).)

    This doesn't even get into the complications of downloading updated pictures where new additional (or deleted) jpg pictures might be associated with a specific MLS#.

    This is my last post on this subject. I'm tired of beating my head against the wall to get my point across on this subject on how this cannot be done without ANY CODING or storing the jpg files themselves (or links to them or links to the folder name!!) I've tried to supply the EASIEST way this can be done but dissappointed that this is ignored and the thought process ia that "there must be an easier way than what pkstormy suggested."

    If you have any EASIER suggestions on how this can be done given the requirements above Simon, I'd like to hear them. But when it's eventually realized that the only way to do this is via one of my suggestions, I'd like to know that my suggestions were at least originally correct (even if they are worded differently but again, the SAME concept/method). Please re-read all the posts on my suggestions!
    Last edited by pkstormy; 04-18-10 at 01:29.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  13. #13
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    One last post: I feel bad that I've reached this level of frustration on trying to get my point across on this subject (which is a first on this forum) and I'm not trying to sound like an @## but I really feel like I'm beating a dead horse to death! But I've already done this same type of coding with this same type of scenario before many, many times, researching all possible solutions. And sadly, I know Rick is going to continue searching for what he thinks is an 'easier' way.
    Last edited by pkstormy; 04-18-10 at 01:33.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  14. #14
    Join Date
    Sep 2006
    Posts
    265
    The penny has dropped. Does the MLS reference exist within all image file names? My thinking is that a Dir within a loop and insert into record into a table maybe an option.

    Although this is inapproriate for this thread, I want to know the following admittedly I only have one image to deal with:

    1) Does the Image exist
    2) Image Height
    3) Image Width
    4) Image Size

    Code:
    Function SetImage()
    
    Dim FullPath As String
            
        With CodeContextObject
            FullPath = GetImageDir & .[ImageFile]
                  
            If Dir([FullPath]) = Empty And .[Image] = -1 Then
                .[Image] = 0
            ElseIf Dir([FullPath]) <> Empty Then
                If .[Image] = 0 Then
                   .[Image] = -1
                End If
                If .[ImageWidth] <> .[ActiveXCtl0].ImageWidth _
                Or .[ImageHeight] <> .[ActiveXCtl0].ImageHeight Then
                    .[ImageWidth] = .[ActiveXCtl0].ImageWidth
                    .[Image Height] = .[ActiveXCtl0].ImageHeight
                    .[ImageSize] = .[ActiveXCtl0].ImageBytes
                End If
            End If
        End With
    
    End Function
    Simon

Posting Permissions

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