Results 1 to 6 of 6

inverting text search while I type letters in dynamic search

  1. #1
    abdolmajed is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    4

    inverting text search while I type letters in dynamic search

    I have MS Access form to do advanced search, when I type "marie" to search in OnChange textbox search to set recordset subform, my letters are jumped to back and inverted. I am sure my code is right



    Click image for larger version. 

Name:	Capture.PNG 
Views:	23 
Size:	1.0 KB 
ID:	40093

    as you see my cursor after type any letter jump back to first an I cann't type .
    I also asked the question of stackoverflow but my problome wasn't solved.

    I expect when I type letters, they are showed right, not inverse. my sample is attached. please take a look and is it possible guide me
    Attached Files Attached Files

  2. #2
    abdolmajed is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    4
    Don't Even admin or big Access teachers want to solve this problem.

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    6,432
    you had 5 downloads before me, so when I see that, I figure why jump in when so many are way ahead of me. After your last post, I decided to look. I now figure maybe it is because you make it difficult to help you. Rather than lock down things for everybody, remove all the obstacles when you post a db.
    That being said, did you test this db for the problem? I ask because the problem doesn't occur. Maybe that's because there's no code at all on the textbox and it is unbound? Did you forget these or other settings/properties?

    Now I see that another textbox might be involved. Still doesn't happen.
    - "doesn't work" is no help. Post err msgs and where.
    - Use code tags for code/sql. Implement changes in copies of your database.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    6,432
    You should explain what the process and goal is; e.g. "get a phone number belonging to the name in the textbox" or "filter a list of phone numbers that match the textbox value as it changes". Something like that - because if it's that simple your approach is WAY too complicated.

  5. #5
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    2,077
    Don't know why you set this db connection to itself. If you execute the line in the immediate window below, the problem goes away. If you did this for security, this is also the crack.

    Click image for larger version. 

Name:	adodb.png 
Views:	8 
Size:	23.7 KB 
ID:	40179
    Last edited by davegri; 11-15-2019 at 04:54 PM.

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    6,432
    As I said, the approach seems far too complicated for what it does. Setting a connection to the same db is something I've never seen before - seems pointless as davegri alludes to. Anyway, can't recall for sure, but I think the cursor behaviour (going to the beginning of the textbox) is typical when the textbox isn't bound. So to keep things as they are (including lack of Option Explicit and improperly declared variables, etc.) try

    Call GetTelfone
    Me.Tsearch.SelStart = Len(Me.Tsearch)
    - "doesn't work" is no help. Post err msgs and where.
    - Use code tags for code/sql. Implement changes in copies of your database.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Dynamic Search in Form
    By LonghronJ in forum Modules
    Replies: 3
    Last Post: 02-28-2018, 01:09 PM
  2. Replies: 8
    Last Post: 11-20-2015, 10:08 AM
  3. Replies: 1
    Last Post: 03-26-2014, 03:38 PM
  4. Replies: 3
    Last Post: 09-02-2013, 04:33 PM
  5. Simple Dynamic Client Search
    By Lorne in forum Forms
    Replies: 4
    Last Post: 12-21-2011, 04:58 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums