Results 1 to 8 of 8
  1. #1
    wasim_sono is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2005
    Location
    Pakistan
    Posts
    73

    Importing hundreds Pictures in table weekly basis as attachments

    HI



    I am using MS-AccessI need to attache pictures (in hundreds) daily basis in my table having attachment field. Pictures have been taken through Hand held computers and saved with concerned meter no + other related information Like M268658502152017121650 in this first 8-characters (M2686585) are meter no. This meter no is stored in table already. I have to attach this picture in table with matching meter no. Actually first get meter no from picture name and then match it to related record and then attach it to concerned field programmatically.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    Not a good idea to store that volume of pictures in a db - you will quickly run out of space.

    Better to store in a designated folder and have the file name stored in the db as a text field. File name might be a combination of meterno (which you already have) and date - which can perhaps be determined from your related information. Looks like the next 8 digits are the date 02152017 (15th Feb 2017?)

  3. #3
    wasim_sono is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2005
    Location
    Pakistan
    Posts
    73
    Actually this information is stored for printing of utility bill. Therefore every month we need to new pictures with reading and print on bill. If we store file name in the text field then how to pick the related pictures and print on bill?

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    you would use an image control.

    Set the controlsource to something like

    ="C:\meterimages" & me.txtMeterNo & ".gif"
    Last edited by CJ_London; 02-27-2017 at 05:26 AM. Reason: missed a \ - for some reason not taking it should be ="C:\meterimages\"....

  5. #5
    wasim_sono is offline Advanced Beginner
    Windows XP Access 2013 64bit
    Join Date
    May 2005
    Location
    Pakistan
    Posts
    73
    I'm using Access 2013. When I select Image control it appends browse popup window for selecting pic. as I select picture it store by default for every record. I also put ="H:\Akmal Imtiaz\Hyderabad\Gr-IV_Feb-2017_Area 5878 Book 01_Part_1" & [me].[meter_no] & "jpeg" in control source of image control but still not found result.

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    if meterno is 123456 then this

    ="H:\Akmal Imtiaz\Hyderabad\Gr-IV_Feb-2017_Area 5878 Book 01_Part_1" & [me].[meter_no] & "jpeg"

    will produce

    H:\Akmal Imtiaz\Hyderabad\Gr-IV_Feb-2017_Area 5878 Book 01_Part_1123456jpeg

    looks like you are missing a '.' - should be ".jpeg"

    Also, check the file extension - can be ".jpg"

    and perhaps a '_' before the meterno?

    Also there is not usually square brackets around me

  7. #7
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    Here is a very simple db to explain

    in the image control source, change "C:\Dev" to the name of the folder you put the images and you should get something like this when you run the report

    edit: for some reason, when the post is saved, it is dropping the last backslash from C:\Dev.

    Click image for larger version. 

Name:	Capture.JPG 
Views:	19 
Size:	32.6 KB 
ID:	27640
    Attached Files Attached Files

  8. #8
    wasim_sono is offline Advanced Beginner
    Windows XP Access 2013 64bit
    Join Date
    May 2005
    Location
    Pakistan
    Posts
    73
    Thanks Ajax for giving your valuable comments.

    I have solved my problem by applying "." in extension and change Jpeg with jpg.

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

Similar Threads

  1. Importing Outlook attachments
    By DHIGHTO in forum Import/Export Data
    Replies: 3
    Last Post: 02-10-2015, 12:58 PM
  2. Sequential Number on the basis of a cell value in Table
    By harpreett.singhh@gmail.co in forum Access
    Replies: 10
    Last Post: 02-26-2014, 03:26 PM
  3. Is a table or query better basis for forms
    By tagteam in forum Access
    Replies: 3
    Last Post: 09-09-2013, 03:45 PM
  4. Replies: 3
    Last Post: 08-30-2012, 05:05 PM
  5. problem with importing email attachments to access
    By funi.t in forum Import/Export Data
    Replies: 1
    Last Post: 12-20-2011, 10:20 AM

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