Share via

How to build an ODBC Connection

Anonymous
2023-07-13T21:47:21+00:00

Now that we have a folder with all of the images, How do I connect to it;

Use the query Wizard?

Where do I find the Data Connection Wizzard?

The name of my folder on the C: Drive is NEPhotos

Can I do it with a SQL statement

I have searched around for where and how to do it, but so far got nowhere.

Thanks Again Guys.

Old NASA Kid

Microsoft 365 and Office | Access | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Duane Hookom 26,820 Reputation points Volunteer Moderator
    2023-07-17T13:32:34+00:00

    In all honesty we have never been made aware of project requirements, statement of purpose, scope, number of users, security, how the application needs to be updated and distributed, how data changes will be handled, etc. I have asked but never been answered. How can we get you somewhere when we really have no idea of where you are going. It's like we are in the back seat of a car offering directions without a clear understanding of our final destination. We know full well how to drive and shift and obey traffic laws and navigate but the drive often makes the same mistakes, doesn't seem to hear, plays the radio too loud and doesn't respond. Apparently the driver knows how to drive a tractor in a field but we are in a nearly self-driving car.

    I have also suggested several times that based on your need for distributing this application across many locations with limited resources and who knows what age of computer, you should consider a web based application. This would allow for instant updates to all users worldwide, You could restrict access if needed. There would be absolutely no cost to any end user unless you wanted to charge a subscription. Images would be available to all users as long as they had a computer, tablet, or phone connected to the internet. No installing anything anywhere.

    If you want to continue down the Access path, please consider creating one new thread with the information I suggested in the first sentence above. Also provide what you currently have which I believe is thousands of images.

    1 person found this answer helpful.
    0 comments No comments

Answer accepted by question author

  1. Anonymous
    2023-07-16T21:14:38+00:00

    I re-vitalized an old form, with two jpg-files:

    Image

    For future use, you can even enlarge the pictures using the Zoom+ button:

    Image

    So, in principle it works, but only with a valid file-specification.

    Imb.

    1 person found this answer helpful.
    0 comments No comments

Answer accepted by question author

  1. Anonymous
    2023-07-16T20:19:59+00:00

    Me.Image25.Picture = strFile ?????????????

    Hi T.Z.,

    If strFile contains the full filespecification, including drive and filetype, it should work

    Imb.

    1 person found this answer helpful.
    0 comments No comments

74 additional answers

Sort by: Most helpful
  1. Duane Hookom 26,820 Reputation points Volunteer Moderator
    2023-08-01T11:26:16+00:00

    If you right-click the image file and choose "Properties" you can check the most significant information your need in the Details tab.

    What do you see? Please share your screenshot.

    1 person found this answer helpful.
    0 comments No comments
  2. Duane Hookom 26,820 Reputation points Volunteer Moderator
    2023-07-14T12:00:48+00:00

    You can't create an ODBC connection to files in a folder. You need to have the file names stored in your table. I believe someone has already provided you with links on how to display images on your form based on the name of the image file.

    Yesterday, I started with a folder of scanned in images of my wife's high school classmates and wanted to create a report of name badges with the images. WIthin about an hour I ran this cmd from the command prompt to create a text file of the images:

    Dir >Images.txt

    I then cleaned up the Images.txt file to remove some top and bottom lines. I could then import the text file and parse out just the image name into a field in my table. I parsed out the First and Last name from the images names which were all similar to Hookom_Duane.jpg. My access file was in the same directory as the images.

    I created a report with some text boxes including the ImageFile field and an image control. I added this code to the On Format event of the Detail section.

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) 
    
        Dim strFile As String 
    
        strFile = CurrentDb.Name   'full name of Access file with the drive and folder 
    
        strFile = Left(strFile, InStrRev(strFile, "\"))   'find just the drive and folder 
    
        strFile = strFile & Me.ImageFile    'add the image file name to the folder 
    
        Me.imgYearbookImage.Picture = strFile    'display the image in the image control 
    
    End Sub
    

    Done in a couple hours.

    0 comments No comments