Results 1 to 4 of 4
  1. #1
    ksapaugh is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2016
    Posts
    2

    Displaying attachment of unlinked field

    I am not sure exactly how to describe what I am trying to do, but I am totally stuck.



    I have a database for a food service company. There are only two tables: 1.)recipe table 2.)weekly menu table.

    The recipe table has the following fields:
    ID
    RecipeName
    Type
    Category
    Attachment

    The weekly menu has dozens of fields in this general pattern:
    Lunch Entree 1_1
    Lunch Entree 1_2
    Lunch Side 1_1
    Lunch Side 1_2
    Etc...

    Each of the fields in the weekly menu are populated by the a query of the recipe table. then I run a report to create a weekly menu and daily menu from the Weekly Menu table. All of this works fine. What I am stuck on is displaying the attachment (actual recipe as a jpg) of the weekly menu.

    For example if Lunch Entree3_1 is "Grilled Chicken", I want the report to display the attachment on the record called "grilled chicken" in the Recipe Table. I don't think it is that hard but I cannot seem to build an expression to make this happen.

    Any help is appreciated.

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    If it is not too late; abandon the Attachment field type - and instead put the path/filename into a text field type. The Attachment field type is difficult to work with and bloats the database.

    Add an Image control to the report.
    After you add and save the image control, delete it's pictureproperty.
    Code the Detail Section's On Format event (if the picture is in the detailsection): Me!ImageName.Picture = Me![FieldNameWithPath]

    when ever you link to exterior images then it is going to be critical to maintain the path/folder names for the long term otherwise the links get broken....

  3. #3
    ksapaugh is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2016
    Posts
    2
    It's not too late. The database only contains info for testing.

    What field type should I use in the table to hold the attachment? a hyperlink?

    Thanks for your help.

  4. #4
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    for this type requirement one would use just a text field type. the hyperlink field type would be for if you wish to click on a hot link (and then the image opens outside the database in a Window).

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

Similar Threads

  1. Attachment Images displaying Sideways
    By Scalec in forum Forms
    Replies: 4
    Last Post: 07-06-2017, 06:25 PM
  2. Replies: 3
    Last Post: 10-13-2014, 05:48 PM
  3. Replies: 2
    Last Post: 08-11-2014, 12:57 PM
  4. Attachment pop up window is not displaying
    By WithoutPause in forum Forms
    Replies: 5
    Last Post: 04-14-2014, 08:58 AM
  5. Displaying an Attachment Query in a Form
    By JaschaMuller in forum Forms
    Replies: 1
    Last Post: 09-30-2011, 07:01 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