Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2006
    Posts
    12

    Exclamation Unanswered: "Find Record" object question

    Ok, I have a quick question that will also result in a quick fix but I have never come across it before. I am writing an application which uses the Find Record functionality so that the user can find a certain record in any given dataset. Well, for some reason every once in a while the user will use this find record and enter what they are looking for and the software will tell them that the record cannot be found when it is actually there. If you close out of the application and come back in it will work fine but for some reason every so often it will do this and the only way to get it to work is to close out of the application and come back in. Has anyone else run across this same problem? Is there something I can do to prevent this? It's kind of a pain for the user to have to close out of what they are doing just for this little nuance. Any help would be GREAT. thanks!

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Intermittent problems like this always make me look for "pilot error" as the NTSB would say. I notice that you say you're "writing" (present tense) but that "users" are having this problem, so someone other than you is utilizing the app. Does it ever do this when you enter the riteria? How is the search criteria entered? Is it typed in or picked from a combo-box? Is there a particular type of record that's likely to cause this? If you re-enter the search criteria a second time without closing the application first, does it always fail the second time?

    And you really do need to let us see your code, if possible.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Aug 2006
    Posts
    12
    Well, I would give you samples of code but it's basically us the code that Access gives you when you make a "Find Record" button on an application. So there is no real change that needs to be made to it. I will try and answer all of your questions, though. This problem has not happened to me but the user normally comes to get me when the problem does happen to have me look at it. So do not know what steps they have necessarily taken prior to that to cause the problem to occur. But then I will ask them to re-enter their search criteria to find a record and they are never successful. Normally, the record they are looking for is a Social Security Number. When I have them search for the item again I do watch to make sure they are doing it correctly and normally they are. So I guess that brings me to my next question. Would could they possibly be doing before doing their search to cause this function to glitch like that to where they wouldn't be able to find a record? Any ideas?

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    IF you used the Command Button Wizard then the code behind the button should, indeed, be correct and not at fault here. The one thought that comes to mind, since it's a social security number usually be input, is whether you have the SSN input mask in place. If the mask is in place, and if they Tab into the box everything is OK, but if your user clicks on the box to input the SSN but doesn't click on the first space, they may type in the number but the last x number of digits will be omitted from the search. The solution for this is in the YourSearchBox_GotFocus sub put the code:

    YourSearchBox.Selstart = 0

    Then, no matter where in the box the user clicks, the cursor will move to the first space.

    Got a family gathering to go to, but I'll check back n a few hours!
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    Join Date
    Aug 2006
    Posts
    12
    Thank you very much for that little bit of insight. I did not know that was the case and that very well could be the cause of the problem! I will insert that bit of code and I'm sure that will solve it because I'm confident that they do not always click at the beginning of the text box when they are searching on that value. Thanks for the help and I will keep you posted on if the problem persists!! Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •