473,382 Members | 1,313 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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

imrosie
222 100+
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
14 1762
NeoPa
32,556 Expert Mod 16PB
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
222 100+
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
32,556 Expert Mod 16PB
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
3,532 Expert 2GB
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
222 100+
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
222 100+
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
32,556 Expert Mod 16PB
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
222 100+
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
32,556 Expert Mod 16PB
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
8,834 Expert 8TB
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
222 100+
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
32,556 Expert Mod 16PB
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
222 100+
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
32,556 Expert Mod 16PB
Good luck.
You know we're here if you need us.
Jun 19 '07 #15

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

Similar topics

11
by: Jeff Wagner | last post by:
I am importing a file which contains a persons name (firstName, middleName, etc). If I define a function to do this, how can I use the variables outside of that function? Here is the code: ...
6
by: Nick via AccessMonster.com | last post by:
Hello all, I've been working on a VBA application in Access for a few months now. This morning, my Access application began to hang in memory, using 97-100% of the CPU, and the only way to...
15
by: Jacob Crossley | last post by:
Hello all. We have about 10 Window's services that we wrote in c#. We use them to process row's that we have queued up in various SQL tables. The services seem to hang at least once in any given...
3
by: Sushil Srivastava | last post by:
Hi Guys, Would you be able to help me using C# GUI (with user interface component) in my MFC application. I have used managed extension, COM-interops, etc but problem is this C# component has...
1
by: AMD Desktop | last post by:
Hi, I have a problem and not sure what is going on here, may be the coding is not proper. This is a simple page with calendar events. Everything works fine until I click on View Week link. Then...
1
by: Rico | last post by:
Hello, Hope someone can help here, I'm trying to modify the following code to use an automation object so I don't have deal with CRAPPY REFERENCES! The reason being is that this will be going...
2
by: Learning.Net | last post by:
hi , I have a application which reads files, directory,and its version and version information is written to text file.Its working fine if files in directory are less but problem arises when no...
3
by: mohithmohith | last post by:
Hello All, We have around 3 windows services written in C#. We use them to process files from a folder into database and further to process the data into various SQL Tables. All the services...
9
by: mohitkumar | last post by:
Hello All, We have 3 windows services written in C#. We use them to process files from a folder into database and further to process the data into various SQL Tables. All the services hang...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.