estrela666
New member
- Local time
- Today, 06:58
- Joined
- Sep 14, 2010
- Messages
- 4
Hello guys.
I spend all morning and a bit of the afternoon of Friday, trying to solve a error in my database. The problem is now "solved", but I wanted to share it with you.
I made a database for my company register their clients purchases. Version 4.1.0 was installed in several computers and working. I made a few changes to the program, and created version 4.1.1. In my computer, when I was developing, I was getting error 2137 when I clicked a listview item to go to a record. The code is:
ID_OBRAS.SetFocus
DoCmd.FindRecord Item.Tag, , , acSearchAll, , , True
To solve this error, I simply clicked my edit button, and when the error occurred again, I clicked the save button... It was stupid, but it worked and I don't know why, but I thought than in the other computers, working in runtime, this wouldn't happen! But it did! So, I did plenty of tests, compare the two versions, search the web and found in this forum someone whith the same problem, who put a requery before the DoCmd.FindRecord line. Instead of the requery, I put Refresh and it worked. No more of error 2137... but my question is why? Why one version runs ok, and the other don’t if the properties and options are equal?
I added a reference to Excel and code to copy, open and write in a excel file. Could this be what’s causing the error? It has nothing to do, but with access we never know...
If any of you want to think about this, I will appreciate! Thanks!
I spend all morning and a bit of the afternoon of Friday, trying to solve a error in my database. The problem is now "solved", but I wanted to share it with you.
I made a database for my company register their clients purchases. Version 4.1.0 was installed in several computers and working. I made a few changes to the program, and created version 4.1.1. In my computer, when I was developing, I was getting error 2137 when I clicked a listview item to go to a record. The code is:
ID_OBRAS.SetFocus
DoCmd.FindRecord Item.Tag, , , acSearchAll, , , True
To solve this error, I simply clicked my edit button, and when the error occurred again, I clicked the save button... It was stupid, but it worked and I don't know why, but I thought than in the other computers, working in runtime, this wouldn't happen! But it did! So, I did plenty of tests, compare the two versions, search the web and found in this forum someone whith the same problem, who put a requery before the DoCmd.FindRecord line. Instead of the requery, I put Refresh and it worked. No more of error 2137... but my question is why? Why one version runs ok, and the other don’t if the properties and options are equal?
I added a reference to Excel and code to copy, open and write in a excel file. Could this be what’s causing the error? It has nothing to do, but with access we never know...
If any of you want to think about this, I will appreciate! Thanks!