Share via

Make Table from Folder

Anonymous
2023-07-28T21:40:03+00:00

I have hundreds of jpeg items in a folder on my pc. Fortunately, they have been named in number (from 1 to 3000) according to the primary ID of my parent table. The idea was to simply match a jpeg name with the ID on the parent table.
How can I create a child table that matches the jpeg name with the parent table? I want to avoid the laborious work of dropping each jpeg item into its corresponding place using forms.

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

ScottGem 68,830 Reputation points Volunteer Moderator
2023-07-30T13:07:31+00:00

I'm confused. You do NOT need to make a table of the image files, I explained this in my first response. You have a table of students, correct? In that Student table is the student ID, correct? That Student ID corresponds to the name of the image file, correct?

If that is the case you do NOT need a separate table to store the locations of the image files. You can use the expression shown to generate the location for the individual student.

Also, you say these images are stored on your hard drive in your users folder. Unless you are the sole user of this app, then the images should be stored on a server folder.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

13 additional answers

Sort by: Most helpful
  1. Anonymous
    2023-07-30T13:34:38+00:00

    The pointer to the location of the images works perfectly on the Students Form, obviating the need to create a separate table. In retrospect, I was looking for a solution to a challenge that never existed.
    I also note your advice to store the images on the server rather than my pc.
    I greatly appreciate your assistance.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2023-07-30T12:31:59+00:00

    My bad!

    Now I understand you perfectly. I had assumed that you meant I did not need to make a table. I have just made a table and the query works fine.

    I am grateful for your time and assistance.

    Was this answer helpful?

    0 comments No comments
  3. ScottGem 68,830 Reputation points Volunteer Moderator
    2023-07-30T12:11:07+00:00

    Here is what I used:

    SELECT ID, 'C:\Users\gbeng\OneDrive\EMC\Photos\QR500' & ID & '.jpg' AS Filepath FROM table;

    Frankly, I do not understand how it could have worked.

    Of course, it didn't work. You haven't told us what your table strucutre is. We are guessing at what the name of your ID field is. We are using table as a placeholder for the actual table name. The suggested statement was not meant to be copy and pasted, but meant for you to substitute your actual object names.

    Again, we can't see what you see. When we ask questions we need answers to be able to help you. I also asked how you used it. Did you use it from Query Design mode or in code?

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2023-07-30T02:27:53+00:00

    Here is what I used:

    SELECT ID, 'C:\Users\gbeng\OneDrive\EMC\Photos\QR500' & ID & '.jpg' AS Filepath FROM table;

    Frankly, I do not understand how it could have worked.

    Was this answer helpful?

    0 comments No comments