Results 1 to 11 of 11
  1. #1
    Mandody is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    18

    Multiple Images Per Record

    Hello All, I'm pretty new to Access so maybe i'm trying to do too much, but I'd like to display multiple images per record, but only one at a time with prev/next buttons. A little background - I write music and I'm creating a database to keep track of my songs. I scribble lyrics down then photograph them and copy these to my PC. As I move through the records/songs on the database form, I'd like a large display of the lyric sheets, just one at a time, with buttons so I can navigate through them. Images are stored on my hard drive and they're in separate folders, one for each song. Ideally, it 'd be nice if these folders could be monitored so when I added more lyrics/photos to each folder, they were automatically imported in to the database, but I'm happy to do this manually if it's not possible.

    First question - is this possible?

    Question two - how do I do it?

    Any advice or general pointers would be greatly appreciated.

    Many thanks in advance.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    The easiest is to make a child table. 1 to many from the master table.
    many photos to 1 ID in the master table.

  3. #3
    Mandody is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    18
    Thanks ranman. Appreciate the response. Just done a little reading and I think it's beginning to make sense. So my main table SONGS has these fields : ID, Title, Chords, Capo, Notes. So in my new LYRICS table I'll just have ID, Title and Lyrics fields. Can I put all the images for one song in to the Lyrics field or do I need to create separate fields for each image? Lyrics 1,2,3 etc. Also what's the best way to link these tables? Title to Title, ID to Title, ID to ID? Or should I just make the Title filed in each table the primary key? Thanks again.

  4. #4
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    tblSongs -SongID, Title, Chords, Capo, Notes.
    tblLyrics -LyricsID, SongIDFK(relate this to SongID above) ,Title and Lyrics ( Path to your image of lyrics )
    All the lyrics images should be stored in this table.

  5. #5
    Mandody is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    18
    Thanks amrut. I've just created the Lyrics table and for the Lyrics field I'm using "memo" as the data type and entering the path to the images...but when I create a form it's just displaying the path, not the image. What have I missed?

    Also, what do I enter in the SongIDFK field? Sorry to ask such basic questions. I'm a complete novice and whenever I Google this stuff I get blinded by code and my brain explodes.

  6. #6
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    to display image, add a image control to form and set its control source to the field displaying the file path
    You do not enter anything in FK field. FK is abrv. I used for Foreign key. In table relationships, relate SongID to SongIDFK (One-To-Many) Once the relationship is set correctly, access will take care of that field automatically. Make sure the SongID (Autonumber ) and SongIDFK (Number, Format Long Integer) are of similar types.Create form based on lyrics table and add it as subform to a form based on table songs. See here for sample http://ms-access-tips.blogspot.ae/20...ationship.html

  7. #7
    Mandody is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    18
    Thanks again amrut. Really appreciate you taking the time to explain this for me. It's almost there I think. I've done what you suggested, but the sub-form is working independently from the main form ie. when I navigate through my song records on the main form, the the sub-form doesn't display the corresponding lyrics.

  8. #8
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    Open property sheet with the sub form selected.On data tab select the appropriate master and child fields and they will be synchronized. If your table relationships are correct, above linking is automatically done.Try the above.

  9. #9
    Mandody is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    18
    Thanks amrut :-) all working fine. One more question before I go. Is it possible to make to make the image paths relative so i can move the database around easily?

  10. #10
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    May be a single folder with all the images, the image path stored in table and if you can use some naming convention to identify an image uniquely, then all you need is to create the image and save it in the designated folder with a naming convention. for ex. photos of all employees stored in a folder by naming respective photo as EmployeeID.jpg. Then you do not need to store the image path, simply set the image's control source to Dlookup("PhotoPath","YourTableName") & Me.EmployeeID & ."jpg"
    Mark the thread as solved if you have the solution. Happy to help.

  11. #11
    Mandody is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    18
    Thanks amrut. I've decided that's a little too complicated for me right now - but i may come back to it later. You've answered my original question so I'll mark this thread as solved. I've got another question but I'll start a separate thread if I can't resolve it myself. Thanks again. Really appreciate it.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Placing multiple images in a form?
    By snowboarder234 in forum Forms
    Replies: 1
    Last Post: 04-30-2013, 05:42 PM
  2. Replies: 4
    Last Post: 12-15-2012, 04:24 PM
  3. Multiple Images per row?
    By Mnelson in forum Access
    Replies: 1
    Last Post: 07-05-2012, 09:10 AM
  4. Replies: 1
    Last Post: 09-27-2011, 08:55 PM
  5. Saving Multiple Images to Form using a filepath
    By Jinxedcookie in forum Forms
    Replies: 3
    Last Post: 09-26-2011, 12:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums