Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Pictures


Message #1 by "Terry Henson" <thccrs@a...> on Fri, 27 Sep 2002 02:59:33
Everyone knows putting pictures in an Access database causes problems with 
bloat and speed.  

What I would like to do is have some information about a person and when 
you open the form containing the information, a field on the form shows a 
pictures that actually resides in a file on the harddrive and not in the 
database.  This field (picture) would be unbound or contain a link or 
something like that to display a certain picture that matched the data.  

Any ideas?

Terry
Message #2 by "Haslett, Andrew" <andrew.haslett@i...> on Fri, 27 Sep 2002 11:47:03 +0930
In the table containing the 'persons' details, you should have a field
containing the URL to the picture of that person.

Now on your form to show the details:

1) Add the control containing the URL of the image - make it invisible (call
it 'ctrImage_URL')

2) Create an Image control (unbound) - call it 'ctrThe_Image'

3) In the OnPrint event of the DETAIL section add the following code:

If Not IsNull(Me![ctrImage_URL]) Then
    Me![ctrThe_Image].Picture = Me![ctrImage_URL]
End If

That should be it!

Cheers,
Andrew

-----Original Message-----
From: Terry Henson [mailto:thccrs@a...]
Sent: Friday, 27 September 2002 12:30 PM
To: Access
Subject: [access] Pictures


Everyone knows putting pictures in an Access database causes problems with 
bloat and speed.  

What I would like to do is have some information about a person and when 
you open the form containing the information, a field on the form shows a 
pictures that actually resides in a file on the harddrive and not in the 
database.  This field (picture) would be unbound or contain a link or 
something like that to display a certain picture that matched the data.  

Any ideas?

Terry
Message #3 by "Gregory Serrano" <SerranoG@m...> on Fri, 27 Sep 2002 13:29:29
Terry,

<< Everyone knows putting pictures in an Access database causes problems 
with bloat and speed.  

What I would like to do is have some information about a person and when 
you open the form containing the information, a field on the form shows a 
pictures that actually resides in a file on the harddrive and not in the 
database.  This field (picture) would be unbound or contain a link or 
something like that to display a certain picture that matched the data. >>

Linking like Andrew said is the best way, but if you MUST embed the files 
make sure they're JPG and not BMP format.  BMPs are on average ten times 
larger in file size than their JPG counterparts.

Greg
Message #4 by "Terry Henson" <thccrs@a...> on Fri, 27 Sep 2002 18:21:18 -0700 (Pacific Daylight Time)
Greg, 

Doing what Andrew suggested is what I think is best, but I am having trouble
getting the code to fire.  He also suggested the code be placed in the On
Print procedure of a form and I am not familiar with that module.

Bottom line is the code doesn't fire for some reason.  I've tried adding to
it and using a command button and nothing seems to work.  By the way, I am
not a CODE warrior, just a hack

Terry

-------Original Message-------

From: Access
Date: Friday, September 27, 2002 5:23:59 AM
To: Access
Subject: [access] Re: Pictures

Terry,

<< Everyone knows putting pictures in an Access database causes problems 
with bloat and speed. 

What I would like to do is have some information about a person and when 
you open the form containing the information, a field on the form shows a 
pictures that actually resides in a file on the harddrive and not in the 
database. This field (picture) would be unbound or contain a link or 
something like that to display a certain picture that matched the data. >>

Linking like Andrew said is the best way, but if you MUST embed the files 
make sure they're JPG and not BMP format. BMPs are on average ten times 
larger in file size than their JPG counterparts.

Greg
.
Message #5 by "Terry Henson" <thccrs@a...> on Fri, 27 Sep 2002 18:30:37 -0700 (Pacific Daylight Time)
Andrew,

Thanks for the ideas, however, I was unable to get it to work.  I was
playing with it and if you have the time, can you see if you can get it to
work.  I was unable to find the OnPrint event for the detail section as well
    

I get an error "Object doesn't support this type of operation" and I placed
the code on the OnOpen property of the form.    I attached the file to send
to you, but the web site would not deliever fearing it was a virus or
something.

Any help would be great.  I tried to option expicit the thing, identify it
in the code with a dim statement, but nothing seemed to work.  I'm not a
code warrior, just a hack.

Regards,
Terry\\


-------Original Message-------

From: Access
Date: Thursday, September 26, 2002 7:39:41 PM
To: Access
Subject: [access] RE: Pictures

In the table containing the 'persons' details, you should have a field
containing the URL to the picture of that person.

Now on your form to show the details:

1) Add the control containing the URL of the image - make it invisible (call
it 'ctrImage_URL')

2) Create an Image control (unbound) - call it 'ctrThe_Image'

3) In the OnPrint event of the DETAIL section add the following code:

If Not IsNull(Me![ctrImage_URL]) Then
Me![ctrThe_Image].Picture = Me![ctrImage_URL]
End If

That should be it!

Cheers,
Andrew

-----Original Message-----
From: Terry Henson [mailto:thccrs@a...]
Sent: Friday, 27 September 2002 12:30 PM
To: Access
Subject: [access] Pictures


Everyone knows putting pictures in an Access database causes problems with 
bloat and speed. 

What I would like to do is have some information about a person and when 
you open the form containing the information, a field on the form shows a 
pictures that actually resides in a file on the harddrive and not in the 
database. This field (picture) would be unbound or contain a link or 
something like that to display a certain picture that matched the data. 

Any ideas?

Terry

.
Message #6 by "Haslett, Andrew" <andrew.haslett@i...> on Sun, 29 Sep 2002 00:11:01 +0930
Hi Terry,

What version of Access are you running?

Cheers,
Andrew

-----Original Message-----
From: Terry Henson [mailto:thccrs@a...]
Sent: Saturday, 28 September 2002 11:01 AM
To: Access
Subject: [access] RE: Pictures


Andrew,

Thanks for the ideas, however, I was unable to get it to work.  I was
playing with it and if you have the time, can you see if you can get it to
work.  I was unable to find the OnPrint event for the detail section as well
    

I get an error "Object doesn't support this type of operation" and I placed
the code on the OnOpen property of the form.    I attached the file to send
to you, but the web site would not deliever fearing it was a virus or
something.

Any help would be great.  I tried to option expicit the thing, identify it
in the code with a dim statement, but nothing seemed to work.  I'm not a
code warrior, just a hack.

Regards,
Terry\\


-------Original Message-------

From: Access
Date: Thursday, September 26, 2002 7:39:41 PM
To: Access
Subject: [access] RE: Pictures

In the table containing the 'persons' details, you should have a field
containing the URL to the picture of that person.

Now on your form to show the details:

1) Add the control containing the URL of the image - make it invisible (call
it 'ctrImage_URL')

2) Create an Image control (unbound) - call it 'ctrThe_Image'

3) In the OnPrint event of the DETAIL section add the following code:

If Not IsNull(Me![ctrImage_URL]) Then
Me![ctrThe_Image].Picture = Me![ctrImage_URL]
End If

That should be it!

Cheers,
Andrew

-----Original Message-----
From: Terry Henson [mailto:thccrs@a...]
Sent: Friday, 27 September 2002 12:30 PM
To: Access
Subject: [access] Pictures


Everyone knows putting pictures in an Access database causes problems with 
bloat and speed. 

What I would like to do is have some information about a person and when 
you open the form containing the information, a field on the form shows a 
pictures that actually resides in a file on the harddrive and not in the 
database. This field (picture) would be unbound or contain a link or 
something like that to display a certain picture that matched the data. 

Any ideas?

Terry

.

Message #7 by "Haslett, Andrew" <andrew.haslett@i...> on Sun, 29 Sep 2002 00:18:50 +0930
ahhh, sorry Terry.  

I think OnPrint event is available only on reports.  I should have checked
that before posting.

When I get back to work, I'll play around with forms and see if there's an
alternative. Perhaps the OnCurrent event...? 

Cheers,
Andrew

-----Original Message-----
From: Haslett, Andrew [mailto:andrew.haslett@i...]
Sent: Sunday, 29 September 2002 12:11 AM
To: Access
Subject: [access] RE: Pictures


Hi Terry,

What version of Access are you running?

Cheers,
Andrew

-----Original Message-----
From: Terry Henson [mailto:thccrs@a...]
Sent: Saturday, 28 September 2002 11:01 AM
To: Access
Subject: [access] RE: Pictures


Andrew,

Thanks for the ideas, however, I was unable to get it to work.  I was
playing with it and if you have the time, can you see if you can get it to
work.  I was unable to find the OnPrint event for the detail section as well
    

I get an error "Object doesn't support this type of operation" and I placed
the code on the OnOpen property of the form.    I attached the file to send
to you, but the web site would not deliever fearing it was a virus or
something.

Any help would be great.  I tried to option expicit the thing, identify it
in the code with a dim statement, but nothing seemed to work.  I'm not a
code warrior, just a hack.

Regards,
Terry\\


-------Original Message-------

From: Access
Date: Thursday, September 26, 2002 7:39:41 PM
To: Access
Subject: [access] RE: Pictures

In the table containing the 'persons' details, you should have a field
containing the URL to the picture of that person.

Now on your form to show the details:

1) Add the control containing the URL of the image - make it invisible (call
it 'ctrImage_URL')

2) Create an Image control (unbound) - call it 'ctrThe_Image'

3) In the OnPrint event of the DETAIL section add the following code:

If Not IsNull(Me![ctrImage_URL]) Then
Me![ctrThe_Image].Picture = Me![ctrImage_URL]
End If

That should be it!

Cheers,
Andrew

-----Original Message-----
From: Terry Henson [mailto:thccrs@a...]
Sent: Friday, 27 September 2002 12:30 PM
To: Access
Subject: [access] Pictures


Everyone knows putting pictures in an Access database causes problems with 
bloat and speed. 

What I would like to do is have some information about a person and when 
you open the form containing the information, a field on the form shows a 
pictures that actually resides in a file on the harddrive and not in the 
database. This field (picture) would be unbound or contain a link or 
something like that to display a certain picture that matched the data. 

Any ideas?

Terry

.


Message #8 by "Terry Henson" <thccrs@a...> on Sat, 28 Sep 2002 07:55:21 -0700 (Pacific Daylight Time)
Andrew,

We are running 2000, I can send the small app I was tinkering with if you
like.

Terry

-------Original Message-------

From: Access
Date: Saturday, September 28, 2002 7:42:47 AM
To: Access
Subject: [access] RE: Pictures

Hi Terry,

What version of Access are you running?

Cheers,
Andrew

-----Original Message-----
From: Terry Henson [mailto:thccrs@a...]
Sent: Saturday, 28 September 2002 11:01 AM
To: Access
Subject: [access] RE: Pictures


Andrew,

Thanks for the ideas, however, I was unable to get it to work. I was
playing with it and if you have the time, can you see if you can get it to
work. I was unable to find the OnPrint event for the detail section as well


I get an error "Object doesn't support this type of operation" and I placed
the code on the OnOpen property of the form. I attached the file to send
to you, but the web site would not deliever fearing it was a virus or
something.

Any help would be great. I tried to option expicit the thing, identify it
in the code with a dim statement, but nothing seemed to work. I'm not a
code warrior, just a hack.

Regards,
Terry\\


-------Original Message-------

From: Access
Date: Thursday, September 26, 2002 7:39:41 PM
To: Access
Subject: [access] RE: Pictures

In the table containing the 'persons' details, you should have a field
containing the URL to the picture of that person.

Now on your form to show the details:

1) Add the control containing the URL of the image - make it invisible (call
it 'ctrImage_URL')

2) Create an Image control (unbound) - call it 'ctrThe_Image'

3) In the OnPrint event of the DETAIL section add the following code:

If Not IsNull(Me![ctrImage_URL]) Then
Me![ctrThe_Image].Picture = Me![ctrImage_URL]
End If

That should be it!

Cheers,
Andrew

-----Original Message-----
From: Terry Henson [mailto:thccrs@a...]
Sent: Friday, 27 September 2002 12:30 PM
To: Access
Subject: [access] Pictures


Everyone knows putting pictures in an Access database causes problems with 
bloat and speed. 

What I would like to do is have some information about a person and when 
you open the form containing the information, a field on the form shows a 
pictures that actually resides in a file on the harddrive and not in the 
database. This field (picture) would be unbound or contain a link or 
something like that to display a certain picture that matched the data. 

Any ideas?

Terry

..


. 

  Return to Index