• A97: Picture DB Size

    Author
    Topic
    #354305

    Hello,

    I am creating a db to hold pictures of our property holdings at work. There are 3 pictures for each property.

    The database with just property info: 336KB
    The database with 9 pictures (with the picts showing in the form: 90MB
    The database with 9 pictures (with the picts showing as an icon: 30MB

    Why is it so big! The jpegs are each about 90KB in size. I have many more properties to add but am concerned about file size.

    Can someone give me some inside to why the database grows so large with such small pics?

    Thanks!

    Viewing 2 reply threads
    Author
    Replies
    • #520326

      This particular problem is well documented in all Access forums I know. Do not store files in your database. Store, instead the filepath to the file (whether it be a .bmp, .jpg, .doc, .txt) and set the object source during runtime to display the file’s contents.

      • #520331

        Hi Jim..

        After I posted this I found all the documentation you are referring to

        Now I have found instructions on how to store the path in the table and having an image control on the report & forms, but am having problems implementing this.

        I have a table with UnitNum, (other irrelevant data), Pic1Path, Pic2Path, Pic3Path

        Now if I understand correctly I store the path in the Pic1Path, etc.

        Then I create an unbound image control on my form. Here is where I am having difficulties..

        Any help?

        • #520334

          look up ‘Picture Property’ in access help

        • #520341

          i always place a invisible textbox in my form that shows the path to the picture.
          then in the code either behind a button or on the oncurrent event i put
          Imagenumber.Picture = Textbox
          for more than one picture you could place several textboxes
          and then place buttons to change the image
          button 1 Imagenumber.Picture = Text1
          button 2 Imagenumber.Picture = Text2
          and i always place this code on the onclose event of the form to clear the picture
          Imagenumber.Picture = “”
          HTH
          JerryC

          • #534587

            Oh I love it, I love it.

            That was exactly what I was looking for even though it took me an hour or so to figure out what you meant.

            Thanks bravo

    • #520378

      I found my answer from a user in the Tek-Tips forum..

      Here is what I did..

      In the oncurrent event on the form I added the following code:

      If Not IsNull(Me!Pict1Path) Then
      Me!Pict1.Visible = True
      Me!Pict1.Picture = Me!Pict1Path
      Else: Me!Pict1.Visible = False
      End If
      If Not IsNull(Me!Pict2Path) Then
      Me!Pict2.Visible = True
      Me!Pict2.Picture = Me!Pict2Path
      Else: Me!Pict2.Visible = False
      End If
      If Not IsNull(Me!Pict3Path) Then
      Me!Pict3.Visible = True
      Me!Pict3.Picture = Me!Pict3Path
      Else: Me!Pict3.Visible = False
      End If

      I have 3 pictures on each form & report & this seems to be working quite well!

      -Leslie

    • #520430

      I created a picture database that uses hyperlinks to access jpgs. Look up ‘hyperlinks’ in help to see how to use them.

    Viewing 2 reply threads
    Reply To: A97: Picture DB Size

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: