Results 1 to 3 of 3
  1. #1
    rayhawk is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2010
    Posts
    14

    Link form to picture & pdf files

    Access newbie here trying to figure out how to link a picture to a form. I have been trying to get this to work in VBA but having some trouble. Basically I have a file structure for my projects, and I want the form to always look in the same spot (under the corresponding project file) for the picture.



    I am familiar with VB.net, MSSQL, and ASP.net, but am new to Access and VBA. I know how to get to the table data from MSSQL using connection strings, parameterized SQL queries, etc. but there must be a simpler way for a local database.

    I have the project number stored in a table. What I want to happen when the user scrolls through (or searches) the Projects Form is for a sample photo to be shown automatically (I found the Form_Current event for this) and also be able to click on a variety of other buttons to open various pdf attachments. I am trying to compose the attachment and picture links dynamically in VBA code to avoid having to enter and store them manually in the table for each new project.

    What I really need is a way to access the current value of a table row in the VBA code.

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    images are stored in their native format outside the db and linked to from the db using either hyperlink field type or file attachment (introduced in Access2007). it is merely a setup in the table and very easily done. consult your text book on either one of these methods.

    the one caution with anything like this is that of course it is the path that is stored - - and so if you rearrange/rename folders; then you render the path invalid...so keep this in mind up front.

    have done alot of multiuser dbs with this feature and it works fine...

  3. #3
    rayhawk is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2010
    Posts
    14
    Thanks for the help, I got it to work now. This article was a big help:

    http://support.microsoft.com/default...b;en-us;285820

    and this one:

    http://office.microsoft.com/en-us/ac...001147204.aspx

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

Similar Threads

  1. Show array of bytes as picture in form
    By HZwaan in forum Forms
    Replies: 0
    Last Post: 06-17-2010, 04:07 AM
  2. Replies: 0
    Last Post: 12-12-2009, 04:45 PM
  3. Replies: 3
    Last Post: 11-14-2009, 05:03 AM
  4. Displaying a picture on a form
    By kydbmaster in forum Forms
    Replies: 4
    Last Post: 04-04-2009, 07:54 PM
  5. Link unbound form to bound form
    By Papote in forum Forms
    Replies: 0
    Last Post: 09-25-2008, 07:42 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