By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,365 Members | 2,946 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,365 IT Pros & Developers. It's quick & easy.

Application hangs while importing (object) using 'Previous' and 'Next'

imrosie
100+
P: 222
Hello,

I have a app that allows for searching of images by stored (links) name.
The absolute path to the images is what's stored. Not the image.
Located at the bottom of the form is a previous and next. Sometimes (not always) when an end-user is searching through, a little box (which always
pops up between images displaying the actual import of the full

absolute path) just sits there and hangs.
You can hit 'cancel' on that box till you green, it won't go away. It
sits there in the middle of the form until you close the database
from Task Manager. Very annoying.

At first I thought it was because that particular image wasn't
available, but that's not the case. I can do a Browse to the folder
where image came from just fine....So something else is going
on. Does anyone (I'm sure there are many ones ) have a clue???
Thanks in advance.

Rosie
Jun 14 '07 #1
Share this Question
Share on Google+
14 Replies


NeoPa
Expert Mod 15k+
P: 31,436
You have (accidentally) posted this question in the Access Articles section. This is NOT an article.
I'm moving this to the main Access questions forum.

MODERATOR.
Jun 14 '07 #2

imrosie
100+
P: 222
You have (accidentally) posted this question in the Access Articles section. This is NOT an article.
I'm moving this to the main Access questions forum.

MODERATOR.
So sorry NeoPa...

Rosie
Jun 14 '07 #3

NeoPa
Expert Mod 15k+
P: 31,436
Don't worry Rosie - you're not the first (doubt you'll be the last either) ;)

In your explanation you don't say how the Previous & Next buttons work.
It may be an outside problem, but if it's within Access we'd need to understand what they are doing. It might be a good idea to post the code for the two buttons (I can't promise anything mind - but we can look at least).

Does this only happen when going one way (Only if you use Next or only Previous)?
Jun 14 '07 #4

missinglinq
Expert 2.5K+
P: 3,532
I've seen this problem posted a number of times before and have never seen a satisfactory resolution to it. The cause usually comes down to the user repeatedly changing images without giving Access time to load each one. The simple fact is that Access doesn't handle images well, and is not a very good choice for this type of application. Sorry!
Jun 14 '07 #5

imrosie
100+
P: 222
I've seen this problem posted a number of times before and have never seen a satisfactory resolution to it. The cause usually comes down to the user repeatedly changing images without giving Access time to load each one. The simple fact is that Access doesn't handle images well, and is not a very good choice for this type of application. Sorry!
I was suspicious that was the case....Any suggestions....??

Rosie
Jun 15 '07 #6

imrosie
100+
P: 222
Don't worry Rosie - you're not the first (doubt you'll be the last either) ;)

In your explanation you don't say how the Previous & Next buttons work.
It may be an outside problem, but if it's within Access we'd need to understand what they are doing. It might be a good idea to post the code for the two buttons (I can't promise anything mind - but we can look at least).

Does this only happen when going one way (Only if you use Next or only Previous)?
NeoPa,

I notice it when moving forward. I haven't seen it when doing a 'previous'...I''m guessing (in my limited knowledge) that it may be happening when there are too many clicks to move forward. Clicks in a rapid succession, thus not allowing Access to fully load the image from the 1st click...

Any ideas or suggestions are certainly welcome. thanks

Rosie
Jun 15 '07 #7

NeoPa
Expert Mod 15k+
P: 31,436
NeoPa,

I notice it when moving forward. I haven't seen it when doing a 'previous'...I''m guessing (in my limited knowledge) that it may be happening when there are too many clicks to move forward. Clicks in a rapid succession, thus not allowing Access to fully load the image from the 1st click...

Any ideas or suggestions are certainly welcome. thanks

Rosie
As I said in post #4 (which you quoted) :
It might be a good idea to post the code for the two buttons (I can't promise anything mind - but we can look at least).
After Linq's comments I can see what may be happening, but without the code I'm guessing in the dark.
Jun 15 '07 #8

imrosie
100+
P: 222
As I said in post #4 (which you quoted) :

After Linq's comments I can see what may be happening, but without the code I'm guessing in the dark.
You're right...I don't want you in the dark...sorry (working on too many projects at the same time)...it was an oversight on my part. Here is the code and thanks again:

Previous:
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdPrev_Click()
  2. On Error GoTo Err_cmdPrev_Click
  3.  DoCmd.GoToRecord , , acPrevious
  4.  
  5. Forms!frmimageInventory!frmimagesubform![imgPicture].Height = OrigHght
  6. Forms!frmimageInventory!frmimagesubform![imgPicture].Width = OrigWdth
  7.  
  8. Exit_cmdPrev_Click:
  9.     Exit Sub
  10.  
  11. Err_cmdPrev_Click:
  12.     MsgBox Err.Description
  13.     Resume Exit_cmdPrev_Click
  14.  
  15. End Sub
Next:
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdNext_Click()
  2. On Error GoTo Err_cmdNext_Click
  3.     DoCmd.GoToRecord , , acNext
  4.  
  5. Forms!frmimageInventory!frmimagesubform![imgPicture].Height = OrigHght
  6. Forms!frmimageInventory!frmimagesubform![imgPicture].Width = OrigWdth
  7.  
  8. Exit_cmdNext_Click:
  9.     Exit Sub
  10.  
  11. Err_cmdNext_Click:
  12.     MsgBox Err.Description
  13.     Resume Exit_cmdNext_Click
  14. End Sub
Please help....thanks
Rosie
Jun 15 '07 #9

NeoPa
Expert Mod 15k+
P: 31,436
NeoPa,

I notice it when moving forward. I haven't seen it when doing a 'previous'...I''m guessing (in my limited knowledge) that it may be happening when there are too many clicks to move forward. Clicks in a rapid succession, thus not allowing Access to fully load the image from the 1st click...

Any ideas or suggestions are certainly welcome. thanks

Rosie
I think this post (#7) is basically the explanation of the situation.
Access (or Windows more likely) can store up the mouse clicks even while the code is busy trying to execute earlier clicks. Access is very poor at returning visual updates to the operator (or even when requested, by the O/S) so it often gives the impression that it has hung irrevocably when really it is simply busy. I suspect that, given a longer wait, it would have returned to you after locking up when it did. Next time try using Ctrl-Break (Pause key) and see if it responds. It may well not but it's worth a try. I looked at your code and it seems the only issue likely to cause this is the file accesses to get the images. Cumulatively, they can very possibly cause this issue.
Please understand, I cannot warrant this answer. It may be entirely wrong, but it's my best understanding. If it were my problem that's what I'd assume is the problem to get around.

Try implementing Next and Previous routines which simply get the name of the item, and wait for another CommandButton to be pressed before committing the choice to the screen. Does that make sense?
Jun 15 '07 #10

ADezii
Expert 5K+
P: 8,627
Hello,

I have a app that allows for searching of images by stored (links) name.
The absolute path to the images is what's stored. Not the image.
Located at the bottom of the form is a previous and next. Sometimes (not always) when an end-user is searching through, a little box (which always
pops up between images displaying the actual import of the full

absolute path) just sits there and hangs.
You can hit 'cancel' on that box till you green, it won't go away. It
sits there in the middle of the form until you close the database
from Task Manager. Very annoying.

At first I thought it was because that particular image wasn't
available, but that's not the case. I can do a Browse to the folder
where image came from just fine....So something else is going
on. Does anyone (I'm sure there are many ones ) have a clue???
Thanks in advance.

Rosie
I had a very similar problem in which I dynamically loaded a large number of inventory graphic images (*.jpg) into an Image Control in the Form's Current() Event. Believe it or not, I solved the problem by converting the *.jpgs to *.bmps. Are you using *.jpgs - if so convert a couple to *.bmps and see what happens.
Jun 15 '07 #11

imrosie
100+
P: 222
I think this post (#7) is basically the explanation of the situation.
Access (or Windows more likely) can store up the mouse clicks even while the code is busy trying to execute earlier clicks. Access is very poor at returning visual updates to the operator (or even when requested, by the O/S) so it often gives the impression that it has hung irrevocably when really it is simply busy. I suspect that, given a longer wait, it would have returned to you after locking up when it did. Next time try using Ctrl-Break (Pause key) and see if it responds. It may well not but it's worth a try. I looked at your code and it seems the only issue likely to cause this is the file accesses to get the images. Cumulatively, they can very possibly cause this issue.
Please understand, I cannot warrant this answer. It may be entirely wrong, but it's my best understanding. If it were my problem that's what I'd assume is the problem to get around.

Try implementing Next and Previous routines which simply get the name of the item, and wait for another CommandButton to be pressed before committing the choice to the screen. Does that make sense?
I think I follow your logic. break each of the commands....Next and Previous into a 2-step process each??? so when a user clicks Next (or Previous?) the command will first display(?) name of the image, then a second user click will actually load(?) the image.....

If that's what you're suggesting wouldn't the image already be loaded in the case of previous? Thanks

Rosie
Jun 17 '07 #12

NeoPa
Expert Mod 15k+
P: 31,436
I think I follow your logic. break each of the commands....Next and Previous into a 2-step process each??? so when a user clicks Next (or Previous?) the command will first display(?) name of the image, then a second user click will actually load(?) the image.....

If that's what you're suggesting wouldn't the image already be loaded in the case of previous? Thanks

Rosie
Possibly, but then you're relying on the caching.
Personally, to keep the interface consistent, I'd do them both the same. It's also safer that way.
Jun 17 '07 #13

imrosie
100+
P: 222
Possibly, but then you're relying on the caching.
Personally, to keep the interface consistent, I'd do them both the same. It's also safer that way.
I'm going to figure out how to code this. thanks

Rosie
Jun 18 '07 #14

NeoPa
Expert Mod 15k+
P: 31,436
Good luck.
You know we're here if you need us.
Jun 19 '07 #15

Post your reply

Sign in to post your reply or Sign up for a free account.