From: Stuart McCall on
I can confirm that Sky has it right. I've had the same problem and was just
about to post something much the same, till I saw Sky's post! That will
solve the problem. The bug is in the progress dialog.


From: Salad on
Prakash wrote:
> On Apr 10, 11:09 pm, Salad <sa...(a)oilandvinegar.com> wrote:
>
>>Prakash wrote:
>>
>>>On Apr 10, 10:36 pm, Salad <sa...(a)oilandvinegar.com> wrote:
>>
>>>>Prakash wrote:
>>
>>>>>I'm using the foll code to display images from a folder on a form.
>>
>>>>>Each time I try to scroll to the "next" record a small window flashes
>>>>>past saying:
>>>>>"Importing C:\Al-Maha-Membership\Snaps\FILENAME.jpg"
>>
>>>>>1) Why does this appear even though I've specified: Application.Echo
>>>>>False
>>
>>>>>2) If I wait for some time (say 1 sec) between each click to go to the
>>>>>next record there's no problem. However, if I try to scroll fast the
>>>>>program hangs after scrolling say 8 to 10 records and Access pops up a
>>>>>message saying:
>>>>>Microsoft Office Access has encountered a problemand needs to close.
>>>>>We are sorry for the inconvenience.
>>
>>>>>Using Access 2003 over Windows Xp SP3.
>>
>>>>>Could someone please look at my code and point out as to where I'm
>>>>>going wrong ?
>>
>>>>>Private Sub Form_Current()
>>
>>>>> Application.Echo False
>>>>> Dim stFileName As String
>>>>> stFileName = "C:\Al-Maha-Membership\Snaps\" + Me.MembershipNo +
>>>>>".jpg"
>>
>>>>> If Dir(stFileName) = "" Then
>>>>> 'MsgBox "file does not exist"
>>>>> Me.Image_Holder.Picture = ""
>>>>> Me.Lbl_NoPhotoAvailable.Visible = True
>>>>> Else
>>>>> 'MsgBox "file does exist"
>>>>> Me.Image_Holder.Picture = "C:\Al-Maha-Membership\Snaps\" +
>>>>>Me.MembershipNo + ".jpg"
>>>>> Me.Lbl_NoPhotoAvailable.Visible = False
>>>>> End If
>>>>> Application.Echo True
>>>>>>>End Sub
>>
>>>>>Rgds,
>>>>>Prakash.
>>
>>>>Maybe the pics are huge? Or you have a lot if them.
>>
>>>>I created a table. Contains 3 fields; ID, PicName, PicImage. Ex:
>>>> 1
>>>> Picture Of Me
>>>> C:\Pics\Pic1.jpg
>>
>>>>I created an image field on the form and named it PicImage. I set the
>>>>PictureType to linked, the Picture link blank.
>>
>>>>Then my code in the OnCurrent is
>>>> Me.PicImage.Picture = Me.PicLink
>>
>>>>I don't get your message. Maybe due to fewer pics, maybe smaller size.
>>>> Mine were about 300K. If your pics are 5 megs in size, maybe try
>>>>Irfanview (free program) and from the menu try Image/Resize.- Hide quoted text -
>>
>>>>- Show quoted text -
>>
>>>Hi Salad ...
>>
>>>I have approx 450 images in the folder. They are jpegs and the average
>>>size of each is approx 20kb. Largest file is 35kb.
>>
>>>Someone else had written this membership application earlier and had
>>>used a bound object frame control with the photos embedded into it.
>>>The table contains approx 500 records and the database size is 1gb.
>>
>>>I wanted to bring down the database size & so wanted to keep a
>>>"linked" image rather than embedding it into the database. And as far
>>>as I remember, this is the preferred and advised approach.
>>
>>>Now when I try to scroll the "bound control" even by holding the mouse
>>>down ... the form hiccups (freezes) every 7 to 8 records and then
>>>continues scrolling for another say 8 records all the way till the end
>>>of the table. But NO CRASHING !! (now, this is with my linked image
>>>control disabled). The moment I enable my linked image control, the
>>>crash comes up. This is very frustrating.
>>
>>>Any ideas ?? If it continues like this I may have to deliver the
>>>package with the embedded image control (ugh) ... the database is
>>>unnecessarily bloated.
>>
>>>Rgds,
>>>Prakash.
>>
>>I used an Image control. I did not use and Unbound or Bound Object
>>Frame control. I did not embed the image, but I did try that as well.
>> It didn't seem to make a speed difference since it was updating the
>>form's field via the current event, not the table field.
>>
>>Do you have an old computer? Or perhaps your computer needs to be
>>rebooted? Or you have barebones memory?- Hide quoted text -
>>
>>- Show quoted text -
>
>
> Running the app on an acer laptop (yes a lil old) ... specs are:
> Intel Pentium M 725 processor, 512MB RAM
> newly formatted last week ... no antivirus insalso as yet - so
> resources are available.
>
> If you feel these are low resources, I'll try it on a faster laptop I
> have Core2Duo 2ghz, 2gb ram running vista. I'll post back after my
> trial in a few mins.
>
> Rgds,
> Prakash.

Your 2nd computer beats mine but the first doesn't sound bad. I had
only done a test on 3 pics. The form was single rec. And I was hitting
the "next record" button on the navigation buttons. I ran my test off
the C: drive so that could be a difference.

I added 350 recs to my table. I opened the form and hit the next button
and kept hitting it as quickly as possible. The form couldn't keep up
with my button presses so when I released at the end the mouse, it still
scrolled on for about about 15 pic records. But I got to 125 pics. I
never saw the message you get. All my pics are around 300K or 15 times
your pic size. My settings were Picture type linked, clipped, and
centered. Used A2003 on XP.

So I don't know.


Maybe
From: Tom van Stiphout on
On Sat, 10 Apr 2010 12:18:25 -0700 (PDT), Prakash
<simran(a)omantel.net.om> wrote:

But I wrote: ...and then in the Form_Timer event stop the timer
(Me.TimerInterval = 0) and then load your image...
You did not move your code that loads the image to the Timer event.

-Tom.
Microsoft Access MVP



>On Apr 10, 11:03�pm, Prakash <sim...(a)omantel.net.om> wrote:
>> On Apr 10, 9:47�pm, Tom van Stiphout <tom7744.no.s...(a)cox.net> wrote:
>>
>>
>>
>>
>>
>> > On Sat, 10 Apr 2010 10:09:15 -0700 (PDT), Prakash
>>
>> > <sim...(a)omantel.net.om> wrote:
>>
>> > The image control is an ActiveX control, and they are not directly
>> > under the full control of their host. That's why .Echo does not work.
>>
>> > You are probably overloading it by scrolling too fast, and it crashes.
>> > Nobody is perfect.
>> > One thing that MAY work is if in Form_Current (which fires when you
>> > scroll to the next record) you start a timer (Me.TimerInterval = 1)
>> > and then in the Form_Timer event stop the timer (Me.TimerInterval = 0)
>> > and then load your image.
>>
>> > -Tom.
>> > Microsoft Access MVP
>>
>> > >I'm using the foll code to display images from a folder on a form.
>>
>> > >Each time I try to scroll to the "next" record a small window flashes
>> > >past saying:
>> > >"Importing C:\Al-Maha-Membership\Snaps\FILENAME.jpg"
>>
>> > >1) Why does this appear even though I've specified: � Application.Echo
>> > >False
>>
>> > >2) If I wait for some time (say 1 sec) between each click to go to the
>> > >next record there's no problem. However, if I try to scroll fast the
>> > >program hangs after scrolling say 8 to 10 records and Access pops up a
>> > >message saying:
>> > >Microsoft Office Access has encountered a problemand needs to close.
>> > >We are sorry for the inconvenience.
>>
>> > >Using Access 2003 over Windows Xp SP3.
>>
>> > >Could someone please look at my code and point out as to where I'm
>> > >going wrong ?
>>
>> > >Private Sub Form_Current()
>>
>> > > � �Application.Echo False
>> > > � �Dim stFileName As String
>> > > � �stFileName = "C:\Al-Maha-Membership\Snaps\" + Me.MembershipNo +
>> > >".jpg"
>>
>> > > � �If Dir(stFileName) = "" Then
>> > > � � � �'MsgBox "file does not exist"
>> > > � � � �Me.Image_Holder.Picture = ""
>> > > � � � �Me.Lbl_NoPhotoAvailable.Visible = True
>> > > � �Else
>> > > � � � �'MsgBox "file does exist"
>> > > � � � �Me.Image_Holder.Picture = "C:\Al-Maha-Membership\Snaps\" +
>> > >Me.MembershipNo + ".jpg"
>> > > � � � �Me.Lbl_NoPhotoAvailable.Visible = False
>> > > � �End If
>> > > � �Application.Echo True
>>
>> > >End Sub
>>
>> > >Rgds,
>> > >Prakash.- Hide quoted text -
>>
>> > - Show quoted text -
>>
>> Thank you Tom for getting back so fast.
>>
>> 1) So, is there any way to hide/disable that message (loading image
>> message ...) ??
>>
>> 2) I'm not scrolling it TOO fast (but reasonably fast - Yes). I'm not
>> continuously pressing the mouse (as with the bound image control)
>> where it works perfectly albeit a little jerky. But no crashes there.
>>
>> 3) You timerinterval solution is new to me. Could you please show me
>> exactly how to go about it as I've never used it before? Really
>> though, I was hoping like in all my other forms (without image
>> controls), the user can just stand on the "next record" icon with the
>> mouse button depressed and watch the records zip past in a flash.
>>
>> If you can think of anything please do let me know. I really
>> appreciate everyone's efforts �here.
>>
>> I hope you can furnish some more details on the timerinterval event.
>>
>> Warm Regards,
>> Prakash.- Hide quoted text -
>>
>> - Show quoted text -
>
>
>I tried the timerinterval solution as you suggested with a setting
>upto 500 as below but it still crashes .... here's my code:
>Private Sub Form_Current()
>
> Me.TimerInterval = 500
> Application.Echo False
> Dim stFileName As String
> stFileName = "C:\Al-Maha-Membership\Snaps\" + Me.MembershipNo +
>".jpg"
>
> If Dir(stFileName) = "" Then
> 'MsgBox "file does not exist"
> Me.Image_Holder.Picture = ""
> Me.Lbl_NoPhotoAvailable.Visible = True
> Else
> 'MsgBox "file does exist"
> Me.Image_Holder.Picture = "C:\Al-Maha-Membership\Snaps\" +
>Me.MembershipNo + ".jpg"
> Me.Lbl_NoPhotoAvailable.Visible = False
> End If
> Application.Echo True
>
>End Sub
>
>Private Sub Form_Timer()
> Me.TimerInterval = 0
>End Sub
>
>
>Rgds,
>Prakash.
From: Prakash on
On Apr 11, 2:57 am, Sky <S...(a)NoSpam.com> wrote:
> > Ok. Tried it on the Core2Duo Laptop. Just cannot get it to crash.
> > That's running VIsta and Office 2007. Try as I might, it would hiccup
> > and jerk while scrolling but it refused to crash. I now need to try it
> > on another fast PC with sufficient resources but running XP and Off
> > 2003. Can do that tomorrow morning only.
>
> > 1 more thing ... from what I've noticed, the bound bound object frame
> > control loads the image a fraction of a second faster than the image
> > control. Is my modus operandi correct i.e. by using a linked image
> > rather than an embedded one ?
>
> > Any other ideas&  advice ?
>
> > In the meanwhile I'll try this app tomo morn on another PC running XP/
> > off2003&  post my findings.
>
> > Rgds,
> > Prakash.
>
> You might try adding this to your registry:
>
> HKLM\SOFTWARE\Microsoft\Shared Tools\Graphics Filters\Import\JPEG\Options
>
> ValueType: string
>
> ValueName: ShowProgressDialog
>
> ValueData: No
>
> In the above, the SubKey should not be wrapped, it is all one line.
>
> Steve- Hide quoted text -
>
> - Show quoted text -

Hi Sky! I tried your solution but the progress dialog still remains
(even after a reboot). The key was already present in my registry with
a value of "Yes". Changing it to "No' made no difference.

From: Stuart McCall on
"Prakash" <simran(a)omantel.net.om> wrote in message
news:96b28b7e-f68b-41d4-b0a1-22553b794787(a)11g2000yqr.googlegroups.com...
On Apr 11, 2:57 am, Sky <S...(a)NoSpam.com> wrote:

> Hi Sky! I tried your solution but the progress dialog still remains
> (even after a reboot). The key was already present in my registry with
> a value of "Yes". Changing it to "No' made no difference.

You may need to make the same change under HKEY_CURRENT_USER. Those two
changes combined solved the same problem for me..