Need help with this function!

  • Thread starter Thread starter Patrick
  • Start date Start date
P

Patrick

HI!!
I've been trying to copy a .jpg image to a OLE Object type
in a table, and so far it works. I've been using the
example from this address:

http://support.microsoft.com/default.aspx?scid=kb;en-
us;210486&Product=acc

Today, I need the help of an expert because I'm trying to
extract the image from my table.
For more details, see the 'WriteBlob' function at the
above link. It details how to get the image(from a table)
and how to send-it to another file.

What I need: Can You help me figure out how to change the
destination to an image box instead of another file...
I think that 'fileData' is the key, but not sure if this
info can be read by an image box.

The expected result is a 'View'(image box),on a form, of
the .jpg so the user can decide if this is the right
picture he or she wants.

Any help in atempting to solve this problem will be much
appriciated,
PAtrick
 
Hi Patrick,

In general, I always try to avoid putting images in my
databases. Storing images in the database will make it
huge and slow very quickly.

Instead, I try to define a structured way of saving and
naming the images, and then set them as the source for an
Image Frame at run time. Or, if the name and path to an
image cannot be automatically constructed (based on the
record key or something of that nature), I store the path
and filename only in a regular text field, then use that
to set the image frame source at run time.

I have had the need to display OLE data from a SQL
database that I have read-only rights to. In that case,
I could not use a bound object frame because Access did
not know what kind of data the field contained, so I used
some code to write the OLE data to a file with the .jpg
extension and then set that as the source for an image
frame. But, in order to keep from slowing down the form
too much, I only do this when the user selects an option
group item to display the image. The SQL database that I
link to has 2 OLE fields, so the unbound option group has
three options: No Image, Vicinity Map, and Project
Schedule. The Form's current event sets the value of the
group to "No Image" by default when going to a new
record. The code to display the image is in the option
group's After Update event.

In case you are interested, the code that I use for this
process is listed below (It looks long, but it's mostly
comments). Watch the wrapping though.

Private Sub FrmUPRSImgOpt_AfterUpdate()
'This procedure saves the OLE data for a UPRS Map or
Gantt Chart to a .jpg file and displays the image
'in an image control on the form.
Dim varProjMap As Variant
Dim bArray() As Byte
Dim strImageFileName As String
Dim rst As DAO.Recordset, dbs As DAO.Database

'Check to see if the user selected "None", in which case
no image is displayed
If Me.FrmUPRSImgOpt = 0 Then
Me.ImgUPRS.Visible = False
Exit Sub
End If

'Check to see if the WCIP project is linked to a UPRS
Project
If IsNull(Me![UPRS ID Ref]) Then
'If there is no value in the UPRS ID Ref field, it is
not possible to display and image.
'Notify the User
MsgBox "There is no UPRS ID - Images can only be
displayed for projects with a UPRS ID"
'Hide the picture to avoid having it display a
previous image that may
'be for another project
Me.ImgUPRS.Visible = False
'Exit the Procedure
Exit Sub
End If

'set the dbs variable to represent the current database
Set dbs = CurrentDb
'set the rst variable to represent the
tzimpUPRSOLEObjects table
Set rst = dbs.OpenRecordset("tzimpUPRSOLEObjects",
dbOpenDynaset)

'Do all of the following with rst
With rst
'Find the index value matching the one for the
account selected by the user
'.Seek "=", Me![UPRS ID Ref]
.FindFirst ("[ProjectID] = " & Me![UPRS ID Ref])
'If no match is found
If .NoMatch = True Then
'Notify the user
MsgBox "Sorry, there are no images for this UPRS
Project ID"
'Hide the picture to avoid having it display a
previous image that may
'be for another project
Me.ImgUPRS.Visible = False
'Exit the Procedure
Exit Sub
End If
'check to see which image field to grab based on the
option group value
If Me.FrmUPRSImgOpt = 1 Then
'If the value is one it means the user has
selected the Map option
'Assign the varProjMap variable to contain the
contents of the Map field in the recordset
varProjMap = rst![Map]
'Assign the image file name
strImageFileName = "Map.jpg"
Else
'If the value is not one (it will be two) it
means the user has selected the Gantt option
'Assign the varProjMap variable to contain the
contents of the Gantt field in the recordset
varProjMap = rst![GanttChart]
'Assign the image file name
strImageFileName = "Gantt.jpg"
End If
'close the recordset now that we are done with it
.Close
End With

'unload the recordset object from memory
Set rst = Nothing

'Is the field empty for this record? If so, don't assign
a photo.
If IsNull(varProjMap) Then
'Hide the picture to avoid having it display a
previous image that may
'be for another project
Me.ImgUPRS.Visible = False
'Notify the user
MsgBox "Sorry, the requested Image has not been
entered in UPRS"
Exit Sub
End If

'Set the image properties to display the image
Me.ImgUPRS.Visible = True

'Resize array to hold BLOB
ReDim bArray(LenB(varProjMap) - 1)

'Copy varProjMap to byte array
bArray = varProjMap

'Insert Path before the File Name of .jpg file to be
created from the OLE Field
'by using the Project Folder function to return the path
to the project folder
strImageFileName = ProjectFolder(Me![ID]) &
strImageFileName
'Create a .jpg file to write the Binary data to
Open strImageFileName For Binary Access Write As #1

'Write binary data to the newly created .jpg file
Put #1, , bArray

'Close the new .jpg file
Close #1

'Bind the new .jpg file to the ImageFrame
Me.ImgUPRS.Picture = strImageFileName
End Sub

Not sure if any of this will help your situation, but I
thought that I would provide it in case it would.

-Ted Allen
 
HI Ted: After reading your solution, I do have some
quetions. At any given time, when you store the path of
the picture you want, where is that picture, do you have a
Folder that keeps all pictures required by your
application... Thats the part I'm don't really understand.
This is my first attempt at using images(more then 2 or 3)
in an application. I need more input on the way you save
and image. where is-it Stored???

Thanks again for any clarification you can give-me,
PAtrick

-----Original Message-----
Hi Patrick,

In general, I always try to avoid putting images in my
databases. Storing images in the database will make it
huge and slow very quickly.

Instead, I try to define a structured way of saving and
naming the images, and then set them as the source for an
Image Frame at run time. Or, if the name and path to an
image cannot be automatically constructed (based on the
record key or something of that nature), I store the path
and filename only in a regular text field, then use that
to set the image frame source at run time.

I have had the need to display OLE data from a SQL
database that I have read-only rights to. In that case,
I could not use a bound object frame because Access did
not know what kind of data the field contained, so I used
some code to write the OLE data to a file with the .jpg
extension and then set that as the source for an image
frame. But, in order to keep from slowing down the form
too much, I only do this when the user selects an option
group item to display the image. The SQL database that I
link to has 2 OLE fields, so the unbound option group has
three options: No Image, Vicinity Map, and Project
Schedule. The Form's current event sets the value of the
group to "No Image" by default when going to a new
record. The code to display the image is in the option
group's After Update event.

In case you are interested, the code that I use for this
process is listed below (It looks long, but it's mostly
comments). Watch the wrapping though.

Private Sub FrmUPRSImgOpt_AfterUpdate()
'This procedure saves the OLE data for a UPRS Map or
Gantt Chart to a .jpg file and displays the image
'in an image control on the form.
Dim varProjMap As Variant
Dim bArray() As Byte
Dim strImageFileName As String
Dim rst As DAO.Recordset, dbs As DAO.Database

'Check to see if the user selected "None", in which case
no image is displayed
If Me.FrmUPRSImgOpt = 0 Then
Me.ImgUPRS.Visible = False
Exit Sub
End If

'Check to see if the WCIP project is linked to a UPRS
Project
If IsNull(Me![UPRS ID Ref]) Then
'If there is no value in the UPRS ID Ref field, it is
not possible to display and image.
'Notify the User
MsgBox "There is no UPRS ID - Images can only be
displayed for projects with a UPRS ID"
'Hide the picture to avoid having it display a
previous image that may
'be for another project
Me.ImgUPRS.Visible = False
'Exit the Procedure
Exit Sub
End If

'set the dbs variable to represent the current database
Set dbs = CurrentDb
'set the rst variable to represent the
tzimpUPRSOLEObjects table
Set rst = dbs.OpenRecordset("tzimpUPRSOLEObjects",
dbOpenDynaset)

'Do all of the following with rst
With rst
'Find the index value matching the one for the
account selected by the user
'.Seek "=", Me![UPRS ID Ref]
.FindFirst ("[ProjectID] = " & Me![UPRS ID Ref])
'If no match is found
If .NoMatch = True Then
'Notify the user
MsgBox "Sorry, there are no images for this UPRS
Project ID"
'Hide the picture to avoid having it display a
previous image that may
'be for another project
Me.ImgUPRS.Visible = False
'Exit the Procedure
Exit Sub
End If
'check to see which image field to grab based on the
option group value
If Me.FrmUPRSImgOpt = 1 Then
'If the value is one it means the user has
selected the Map option
'Assign the varProjMap variable to contain the
contents of the Map field in the recordset
varProjMap = rst![Map]
'Assign the image file name
strImageFileName = "Map.jpg"
Else
'If the value is not one (it will be two) it
means the user has selected the Gantt option
'Assign the varProjMap variable to contain the
contents of the Gantt field in the recordset
varProjMap = rst![GanttChart]
'Assign the image file name
strImageFileName = "Gantt.jpg"
End If
'close the recordset now that we are done with it
.Close
End With

'unload the recordset object from memory
Set rst = Nothing

'Is the field empty for this record? If so, don't assign
a photo.
If IsNull(varProjMap) Then
'Hide the picture to avoid having it display a
previous image that may
'be for another project
Me.ImgUPRS.Visible = False
'Notify the user
MsgBox "Sorry, the requested Image has not been
entered in UPRS"
Exit Sub
End If

'Set the image properties to display the image
Me.ImgUPRS.Visible = True

'Resize array to hold BLOB
ReDim bArray(LenB(varProjMap) - 1)

'Copy varProjMap to byte array
bArray = varProjMap

'Insert Path before the File Name of .jpg file to be
created from the OLE Field
'by using the Project Folder function to return the path
to the project folder
strImageFileName = ProjectFolder(Me![ID]) &
strImageFileName
'Create a .jpg file to write the Binary data to
Open strImageFileName For Binary Access Write As #1

'Write binary data to the newly created .jpg file
Put #1, , bArray

'Close the new .jpg file
Close #1

'Bind the new .jpg file to the ImageFrame
Me.ImgUPRS.Picture = strImageFileName
End Sub

Not sure if any of this will help your situation, but I
thought that I would provide it in case it would.

-Ted Allen

-----Original Message-----
HI!!
I've been trying to copy a .jpg image to a OLE Object type
in a table, and so far it works. I've been using the
example from this address:

http://support.microsoft.com/default.aspx?scid=kb;en-
us;210486&Product=acc

Today, I need the help of an expert because I'm trying to
extract the image from my table.
For more details, see the 'WriteBlob' function at the
above link. It details how to get the image(from a table)
and how to send-it to another file.

What I need: Can You help me figure out how to change the
destination to an image box instead of another file...
I think that 'fileData' is the key, but not sure if this
info can be read by an image box.

The expected result is a 'View'(image box),on a form, of
the .jpg so the user can decide if this is the right
picture he or she wants.

Any help in atempting to solve this problem will be much
appriciated,
PAtrick
.
.
 
Hi Patrick,

The main database that I work with is project related.
For that database, there is a subfolder below the
database location (on the network) for each project with
the folder name = to the Project ID (actually there is an
in-between level of folders grouping them by 50 projects
at a time).

Similarly, you could choose to have a single folder
somewhere on the network to hold all of your photos and
name the photo with the RecordID. Or, if a record could
have more than one photo you could name them with the
recordID and a serial number (of course then you would
need a list box to display all photos with a matching
prefix so that the user could select the photo to
display).

I think that different solutions work best for different
situations. The most important thing is that all users
have access to the locations where the files are stored.
But, also important is to come up with a structured way
of naming and storing the files such that it will be easy
to manage and access the files, and also such that the
system is expandable down the road.

Depending on the sophistication of your users, and the
workflow that you will be dealing with, you could either
have them just name and save the files appropriately on
their own (according to the conventions that you set up)
or you could write code so that they would be prompted
for a file that they wish to add to the db, then have the
code copy the file to the appropriate location with the
appropriate name.

Hope that helps. Post back if you have further questions.

-Ted Allen
-----Original Message-----
HI Ted: After reading your solution, I do have some
quetions. At any given time, when you store the path of
the picture you want, where is that picture, do you have a
Folder that keeps all pictures required by your
application... Thats the part I'm don't really understand.
This is my first attempt at using images(more then 2 or 3)
in an application. I need more input on the way you save
and image. where is-it Stored???

Thanks again for any clarification you can give-me,
PAtrick

-----Original Message-----
Hi Patrick,

In general, I always try to avoid putting images in my
databases. Storing images in the database will make it
huge and slow very quickly.

Instead, I try to define a structured way of saving and
naming the images, and then set them as the source for an
Image Frame at run time. Or, if the name and path to an
image cannot be automatically constructed (based on the
record key or something of that nature), I store the path
and filename only in a regular text field, then use that
to set the image frame source at run time.

I have had the need to display OLE data from a SQL
database that I have read-only rights to. In that case,
I could not use a bound object frame because Access did
not know what kind of data the field contained, so I used
some code to write the OLE data to a file with the .jpg
extension and then set that as the source for an image
frame. But, in order to keep from slowing down the form
too much, I only do this when the user selects an option
group item to display the image. The SQL database that I
link to has 2 OLE fields, so the unbound option group has
three options: No Image, Vicinity Map, and Project
Schedule. The Form's current event sets the value of the
group to "No Image" by default when going to a new
record. The code to display the image is in the option
group's After Update event.

In case you are interested, the code that I use for this
process is listed below (It looks long, but it's mostly
comments). Watch the wrapping though.

Private Sub FrmUPRSImgOpt_AfterUpdate()
'This procedure saves the OLE data for a UPRS Map or
Gantt Chart to a .jpg file and displays the image
'in an image control on the form.
Dim varProjMap As Variant
Dim bArray() As Byte
Dim strImageFileName As String
Dim rst As DAO.Recordset, dbs As DAO.Database

'Check to see if the user selected "None", in which case
no image is displayed
If Me.FrmUPRSImgOpt = 0 Then
Me.ImgUPRS.Visible = False
Exit Sub
End If

'Check to see if the WCIP project is linked to a UPRS
Project
If IsNull(Me![UPRS ID Ref]) Then
'If there is no value in the UPRS ID Ref field, it is
not possible to display and image.
'Notify the User
MsgBox "There is no UPRS ID - Images can only be
displayed for projects with a UPRS ID"
'Hide the picture to avoid having it display a
previous image that may
'be for another project
Me.ImgUPRS.Visible = False
'Exit the Procedure
Exit Sub
End If

'set the dbs variable to represent the current database
Set dbs = CurrentDb
'set the rst variable to represent the
tzimpUPRSOLEObjects table
Set rst = dbs.OpenRecordset("tzimpUPRSOLEObjects",
dbOpenDynaset)

'Do all of the following with rst
With rst
'Find the index value matching the one for the
account selected by the user
'.Seek "=", Me![UPRS ID Ref]
.FindFirst ("[ProjectID] = " & Me![UPRS ID Ref])
'If no match is found
If .NoMatch = True Then
'Notify the user
MsgBox "Sorry, there are no images for this UPRS
Project ID"
'Hide the picture to avoid having it display a
previous image that may
'be for another project
Me.ImgUPRS.Visible = False
'Exit the Procedure
Exit Sub
End If
'check to see which image field to grab based on the
option group value
If Me.FrmUPRSImgOpt = 1 Then
'If the value is one it means the user has
selected the Map option
'Assign the varProjMap variable to contain the
contents of the Map field in the recordset
varProjMap = rst![Map]
'Assign the image file name
strImageFileName = "Map.jpg"
Else
'If the value is not one (it will be two) it
means the user has selected the Gantt option
'Assign the varProjMap variable to contain the
contents of the Gantt field in the recordset
varProjMap = rst![GanttChart]
'Assign the image file name
strImageFileName = "Gantt.jpg"
End If
'close the recordset now that we are done with it
.Close
End With

'unload the recordset object from memory
Set rst = Nothing

'Is the field empty for this record? If so, don't assign
a photo.
If IsNull(varProjMap) Then
'Hide the picture to avoid having it display a
previous image that may
'be for another project
Me.ImgUPRS.Visible = False
'Notify the user
MsgBox "Sorry, the requested Image has not been
entered in UPRS"
Exit Sub
End If

'Set the image properties to display the image
Me.ImgUPRS.Visible = True

'Resize array to hold BLOB
ReDim bArray(LenB(varProjMap) - 1)

'Copy varProjMap to byte array
bArray = varProjMap

'Insert Path before the File Name of .jpg file to be
created from the OLE Field
'by using the Project Folder function to return the path
to the project folder
strImageFileName = ProjectFolder(Me![ID]) &
strImageFileName
'Create a .jpg file to write the Binary data to
Open strImageFileName For Binary Access Write As #1

'Write binary data to the newly created .jpg file
Put #1, , bArray

'Close the new .jpg file
Close #1

'Bind the new .jpg file to the ImageFrame
Me.ImgUPRS.Picture = strImageFileName
End Sub

Not sure if any of this will help your situation, but I
thought that I would provide it in case it would.

-Ted Allen

-----Original Message-----
HI!!
I've been trying to copy a .jpg image to a OLE Object type
in a table, and so far it works. I've been using the
example from this address:

http://support.microsoft.com/default.aspx?scid=kb;en-
us;210486&Product=acc

Today, I need the help of an expert because I'm trying to
extract the image from my table.
For more details, see the 'WriteBlob' function at the
above link. It details how to get the image(from a table)
and how to send-it to another file.

What I need: Can You help me figure out how to change the
destination to an image box instead of another file...
I think that 'fileData' is the key, but not sure if this
info can be read by an image box.

The expected result is a 'View'(image box),on a form, of
the .jpg so the user can decide if this is the right
picture he or she wants.

Any help in atempting to solve this problem will be much
appriciated,
PAtrick
.
.
.
 
That what I needed, Iunderstand better what you where
explaining before, thanks again...
PAtrick
-----Original Message-----
Hi Patrick,

The main database that I work with is project related.
For that database, there is a subfolder below the
database location (on the network) for each project with
the folder name = to the Project ID (actually there is an
in-between level of folders grouping them by 50 projects
at a time).

Similarly, you could choose to have a single folder
somewhere on the network to hold all of your photos and
name the photo with the RecordID. Or, if a record could
have more than one photo you could name them with the
recordID and a serial number (of course then you would
need a list box to display all photos with a matching
prefix so that the user could select the photo to
display).

I think that different solutions work best for different
situations. The most important thing is that all users
have access to the locations where the files are stored.
But, also important is to come up with a structured way
of naming and storing the files such that it will be easy
to manage and access the files, and also such that the
system is expandable down the road.

Depending on the sophistication of your users, and the
workflow that you will be dealing with, you could either
have them just name and save the files appropriately on
their own (according to the conventions that you set up)
or you could write code so that they would be prompted
for a file that they wish to add to the db, then have the
code copy the file to the appropriate location with the
appropriate name.

Hope that helps. Post back if you have further questions.

-Ted Allen
-----Original Message-----
HI Ted: After reading your solution, I do have some
quetions. At any given time, when you store the path of
the picture you want, where is that picture, do you have a
Folder that keeps all pictures required by your
application... Thats the part I'm don't really understand.
This is my first attempt at using images(more then 2 or 3)
in an application. I need more input on the way you save
and image. where is-it Stored???

Thanks again for any clarification you can give-me,
PAtrick

-----Original Message-----
Hi Patrick,

In general, I always try to avoid putting images in my
databases. Storing images in the database will make it
huge and slow very quickly.

Instead, I try to define a structured way of saving and
naming the images, and then set them as the source for an
Image Frame at run time. Or, if the name and path to an
image cannot be automatically constructed (based on the
record key or something of that nature), I store the path
and filename only in a regular text field, then use that
to set the image frame source at run time.

I have had the need to display OLE data from a SQL
database that I have read-only rights to. In that case,
I could not use a bound object frame because Access did
not know what kind of data the field contained, so I used
some code to write the OLE data to a file with the .jpg
extension and then set that as the source for an image
frame. But, in order to keep from slowing down the form
too much, I only do this when the user selects an option
group item to display the image. The SQL database that I
link to has 2 OLE fields, so the unbound option group has
three options: No Image, Vicinity Map, and Project
Schedule. The Form's current event sets the value of the
group to "No Image" by default when going to a new
record. The code to display the image is in the option
group's After Update event.

In case you are interested, the code that I use for this
process is listed below (It looks long, but it's mostly
comments). Watch the wrapping though.

Private Sub FrmUPRSImgOpt_AfterUpdate()
'This procedure saves the OLE data for a UPRS Map or
Gantt Chart to a .jpg file and displays the image
'in an image control on the form.
Dim varProjMap As Variant
Dim bArray() As Byte
Dim strImageFileName As String
Dim rst As DAO.Recordset, dbs As DAO.Database

'Check to see if the user selected "None", in which case
no image is displayed
If Me.FrmUPRSImgOpt = 0 Then
Me.ImgUPRS.Visible = False
Exit Sub
End If

'Check to see if the WCIP project is linked to a UPRS
Project
If IsNull(Me![UPRS ID Ref]) Then
'If there is no value in the UPRS ID Ref field, it is
not possible to display and image.
'Notify the User
MsgBox "There is no UPRS ID - Images can only be
displayed for projects with a UPRS ID"
'Hide the picture to avoid having it display a
previous image that may
'be for another project
Me.ImgUPRS.Visible = False
'Exit the Procedure
Exit Sub
End If

'set the dbs variable to represent the current database
Set dbs = CurrentDb
'set the rst variable to represent the
tzimpUPRSOLEObjects table
Set rst = dbs.OpenRecordset("tzimpUPRSOLEObjects",
dbOpenDynaset)

'Do all of the following with rst
With rst
'Find the index value matching the one for the
account selected by the user
'.Seek "=", Me![UPRS ID Ref]
.FindFirst ("[ProjectID] = " & Me![UPRS ID Ref])
'If no match is found
If .NoMatch = True Then
'Notify the user
MsgBox "Sorry, there are no images for this UPRS
Project ID"
'Hide the picture to avoid having it display a
previous image that may
'be for another project
Me.ImgUPRS.Visible = False
'Exit the Procedure
Exit Sub
End If
'check to see which image field to grab based on the
option group value
If Me.FrmUPRSImgOpt = 1 Then
'If the value is one it means the user has
selected the Map option
'Assign the varProjMap variable to contain the
contents of the Map field in the recordset
varProjMap = rst![Map]
'Assign the image file name
strImageFileName = "Map.jpg"
Else
'If the value is not one (it will be two) it
means the user has selected the Gantt option
'Assign the varProjMap variable to contain the
contents of the Gantt field in the recordset
varProjMap = rst![GanttChart]
'Assign the image file name
strImageFileName = "Gantt.jpg"
End If
'close the recordset now that we are done with it
.Close
End With

'unload the recordset object from memory
Set rst = Nothing

'Is the field empty for this record? If so, don't assign
a photo.
If IsNull(varProjMap) Then
'Hide the picture to avoid having it display a
previous image that may
'be for another project
Me.ImgUPRS.Visible = False
'Notify the user
MsgBox "Sorry, the requested Image has not been
entered in UPRS"
Exit Sub
End If

'Set the image properties to display the image
Me.ImgUPRS.Visible = True

'Resize array to hold BLOB
ReDim bArray(LenB(varProjMap) - 1)

'Copy varProjMap to byte array
bArray = varProjMap

'Insert Path before the File Name of .jpg file to be
created from the OLE Field
'by using the Project Folder function to return the path
to the project folder
strImageFileName = ProjectFolder(Me![ID]) &
strImageFileName
'Create a .jpg file to write the Binary data to
Open strImageFileName For Binary Access Write As #1

'Write binary data to the newly created .jpg file
Put #1, , bArray

'Close the new .jpg file
Close #1

'Bind the new .jpg file to the ImageFrame
Me.ImgUPRS.Picture = strImageFileName
End Sub

Not sure if any of this will help your situation, but I
thought that I would provide it in case it would.

-Ted Allen


-----Original Message-----
HI!!
I've been trying to copy a .jpg image to a OLE Object
type
in a table, and so far it works. I've been using the
example from this address:

http://support.microsoft.com/default.aspx?scid=kb;en-
us;210486&Product=acc

Today, I need the help of an expert because I'm trying
to
extract the image from my table.
For more details, see the 'WriteBlob' function at the
above link. It details how to get the image(from a
table)
and how to send-it to another file.

What I need: Can You help me figure out how to change
the
destination to an image box instead of another file...
I think that 'fileData' is the key, but not sure if this
info can be read by an image box.

The expected result is a 'View'(image box),on a form, of
the .jpg so the user can decide if this is the right
picture he or she wants.

Any help in atempting to solve this problem will be much
appriciated,
PAtrick
.

.
.
.
 
"Patrick" wrote
I've been trying to copy a .jpg image
to a OLE Object type in a table, and
so far it works. I've been using the
example from this address:

The sample imaging databases at http://accdevel.tripod.com illustrate three
approaches to handling images in Access, and the download includes an
article discussing considerations in choosing an approach. Two of the
approaches do not use OLE Objects and, thus, avoid the database bloat, and
some other problems, associated with images in OLE Objects.

If you are printing the images in reports, to avoid memory leakage, you
should also see MVP Stephen Lebans' http://www.lebans.com/printfailures.htm.
PrintFailure.zip is an Access97 MDB containing a report that fails during
the Access formatting process prior to being spooled to the Printer Driver.
This MDB also contains code showing how to convert the contents of the Image
control to a Bitmap file prior to printing. This helps alleviate the "Out of
Memory" error that can popup when printing image intensive reports.

Larry Linson
Microsoft Access MVP
 
Back
Top