image file making database too large

T

Tom

I went to the Northwind datase and copy and pasted the
Add/Change button and Remove button along with the VB
code from the On Click Event Procedure of those buttons.
I also copied the getFileName Sub routine- It appears
that it is getting caught up on the line

With Application.FileDialog(msoFileDialogFilePicker)

Not sure how to modify this for my system.
Do I need to make sure we put all picture files in a
given folder????????? Were would I put that folder
location??????

Please help!!

Subroutine copied from Employee Form - Northwind
Sub getFileName()
' Displays the Office File Open dialog to choose a
file name
' for the current employee record. If the user
selects a file
' display it in the image control.
Dim fileName As String
Dim result As Integer
With Application.FileDialog(msoFileDialogFilePicker)
.Title = "Select Employee Picture"
.Filters.Add "All Files", "*.*"
.Filters.Add "JPEGs", "*.jpg"
.Filters.Add "Bitmaps", "*.bmp"
.FilterIndex = 3
.AllowMultiSelect = False
.InitialFileName = CurrentProject.Path
result = .Show
If (result <> 0) Then
fileName = Trim(.SelectedItems.Item(1))
Me![ImagePath].Visible = True
Me![ImagePath].SetFocus
Me![ImagePath].Text = fileName
Me![FirstName].SetFocus
Me![ImagePath].Visible = False
End If
End With
End Sub




Previously WRITTEN

Subject: Re: Access database is 2gb
From: "Lynn Trapp" <[email protected]>
Sent: 9/16/2004 11:23:21 AM




Storing images in the database can definitely cause
significant bloating.
You should, instead, store the path to the image file and
use code to
display the image on a form or report when you need it.
The Northwind
database has a good example of how to do this on the
Employee form.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


message
My access database is already 2Gigabytes after only
22,000 records and we are getting invalid argument when
we try to do anything. I think it is so large because
one of the fields includes a scanned document that must
be a scanned file.

what are the best options with out deleted the oldest
records since we would like this in ONE DAtabase for at
least a years worth of data???

thanks,
tom


..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top