MY METHOD:-
I have bmp images 200dpi showing as different images for each record, 4
different images per record, can have more,
My NG threads are as follows:-
All messages from thread
Message 1 in thread
From: Steve (
[email protected])
Subject: Easy one.. Help reqd on applying new found anti image store Form
code to Record
View this article only
Newsgroups: microsoft.public.access.forms
Date: 2000-10-11 08:06:29 PST
I am using Access97 Prof Edn, Windows 98
In order to let records show images BUT to avoid access storing these images
(even if linked) in a table and the file size going mega, I have used the
following procedure from the msoft support site article Q148/4/63. Dead
Easy for Form View !
Create a new table called ImageTable and field called ImagePath
Add path and name of image to each record in the table (a bit laborious)
Create a new Form based on ImageTable, call it ImageForm
Open ImageForm in design view and use Image tool to add an image control,
choose 'any old image' for it, in properties name it ImageFrame.
Set the ImageForm's OnCurrent property to:-
Private Sub Form_Current()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub
Set the AfterUpdate property of ImagePath text box to:-
Private Sub ImagePath_AfterUpdate()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub
Open the ImageForm in Form view. Form displays the correct image for each
record...BINGO !
NOW.....My real need in all this is to create printed matter using Reports
showing images for each record.
I have gone into Reports design view and dragdropped the ID and ImagePath
controls onto the page, then used Image tool to create an image control.
I then set the Reports OnOpen property, by pasting in the same two lines of
code again, to:-
Private Sub Report_Open(Cancel As Integer)
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub
(this displays the 'any old image' repeatedly down the page in Report View,
but I need to see the correct record images.
NOW, AS IN FORM VIEW, THERE IS THE SECOND CODE TO GO IN (I ASSUME), BUT
WHERE ?????
I'm sure its an easy one for someone into codes, but my knowledge of code is
' I put what I get told where I get told ', bear this in mind when
responding !
PLEASE HELP. Its taken me two days precious leave to sort out jpegs showing
and avoiding mega filesize and I should have been scanning and creating
records and I'm almost out of time...cripes !
Hope the above and answer to this helps others out there in Access land in
the same predicament.
Steve.
Message 2 in thread
From: Simon Lewis (
[email protected])
Subject: Re: Easy one.. Help reqd on applying new found anti image store
Form code to Record
View this article only
Newsgroups: microsoft.public.access.forms
Date: 2000-10-11 13:07:33 PST
Hi Steve,
Use the Detail_Format event, rather than Report_Open. Same code, though.
----
Simon Lewis
Steve said:
I am using Access97 Prof Edn, Windows 98
In order to let records show images BUT to avoid access storing these images
(even if linked) in a table and the file size going mega, I have used the
following procedure from the msoft support site article Q148/4/63. Dead
Easy for Form View !
Create a new table called ImageTable and field called ImagePath
Add path and name of image to each record in the table (a bit laborious)
Create a new Form based on ImageTable, call it ImageForm
Open ImageForm in design view and use Image tool to add an image control,
choose 'any old image' for it, in properties name it ImageFrame.
Set the ImageForm's OnCurrent property to:-
Private Sub Form_Current()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub
Set the AfterUpdate property of ImagePath text box to:-
Private Sub ImagePath_AfterUpdate()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub
Open the ImageForm in Form view. Form displays the correct image for each
record...BINGO !
NOW.....My real need in all this is to create printed matter using Reports
showing images for each record.
I have gone into Reports design view and dragdropped the ID and ImagePath
controls onto the page, then used Image tool to create an image control.
I then set the Reports OnOpen property, by pasting in the same two lines of
code again, to:-
Private Sub Report_Open(Cancel As Integer)
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub
(this displays the 'any old image' repeatedly down the page in Report View,
but I need to see the correct record images.
NOW, AS IN FORM VIEW, THERE IS THE SECOND CODE TO GO IN (I ASSUME), BUT
WHERE ?????
I'm sure its an easy one for someone into codes, but my knowledge of code is
' I put what I get told where I get told ', bear this in mind when
responding !
PLEASE HELP. Its taken me two days precious leave to sort out jpegs showing
and avoiding mega filesize and I should have been scanning and creating
records and I'm almost out of time...cripes !
Hope the above and answer to this helps others out there in Access land in
the same predicament.
Steve.
©2003 Google
AND
Hi,
To avoid ballistic file size and crashes, this is the way to store images
(tip, use bmp not jpg, as jpg get doubled up plus a third !)
I have a Form based on a Table which has fields with image paths (PC address
of image)...OverallPicPath and CloseUpPicPath
Is this coding correct ? ...(method below for those interested !)
I ask as I am finding that the bmp images have a grid of broken thin black
lines over them, spoiling my creation !, (another I did on another pc sees
bmp images looking cooked with odd extra colours), ...JPG's look better BUT
Access performs an uncompression on each one behind the scenes, as well as
putting up front a bmp version, lot of processor usage as you scroll through
records ! causing blue progress bar and bigger file size.
ALSO, once I hit upon a record with both images, moving fwds or back still
sees the image(s) showing !!! until I hit another record with images, then
that does same, by putting C:\NONE in the fields it stpos this, but thats a
pain to do each time, is the fault in the coding ?
Private Sub Form_Current()
On Error Resume Next
Me![OverallPic].Picture = Me![OverallPicPath]
Me![CloseUpPic].Picture = Me![CloseUpPicPath]
End Sub
Private Sub OverallPicPath_AfterUpdate()
On Error Resume Next
Me![OverallPic].Picture = Me![OverallPicPath]
Me![CloseUpPic].Picture = Me![CloseUpPicPath]
End Sub
METHOD FOR THOSE INTERESTED IN DOING SIMILAR IS:-
Once you have your table with text field for PC image path, then create a
form based on this table.
Include in it the ImagePath field, then with IMAGE tool create an image
control, it asks for an image, give it any small bmp !
Make its properties read LINKED and Name OverallPic,...the linked aspect is
vital, other article seen on this misses this fact, culminating in still a
large file size !
In its properties name it OverallPic (this to tie in with my question
above, obviously suit yourself !)
In Form Property , set OnCurrent event (CodeBuilder) as above.
Set AfterUpdate property of OverallPicPath as above
20Mb's of images can see file size 400Kb, it will gradually increase, graph
of image v file sees 45 degree line for image, and almost flatline for file
!
Steve
HOPE THIS HELPS !