Results 1 to 6 of 6
  1. #1
    Sweetu is offline Novice
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2016
    Posts
    19

    recordset clone and search

    Hey dears!

    May I expect any help from you...
    How to make recordset from query and than search via VB code from query by entering data into Textbox?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    If the textbox ,txtName, is to search only the name box then make a query, qsFind, to look at the box:

    select * from table where [name]=forms!myForm!txtName

    then the find button will run the macro with the command,
    Openquery "qsFind"

  3. #3
    Sweetu is offline Novice
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2016
    Posts
    19
    I'm searching on query...

    Before I'm using this code

    Me.txtsearch = Like "*" & Forms!navigationform.forms!txtsearch
    Me.filter=true

    It's very slow...
    I need to search by another method either recordset clone or recordset...
    Where txtsearch is Textbox name...

  4. #4
    Sweetu is offline Novice
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2016
    Posts
    19
    Quote Originally Posted by ranman256 View Post
    If the textbox ,txtName, is to search only the name box then make a query, qsFind, to look at the box:

    select * from table where [name]=forms!myForm!txtName

    then the find button will run the macro with the command,
    Openquery "qsFind"
    I'm searching on query...

    Before I'm using this code

    Me.txtsearch = Like "*" & Forms!navigationform.forms!txtsearch
    Me.filter=true

    It's very slow...
    I need to search by another method either recordset clone or recordset...
    Where txtsearch is Textbox name...

  5. #5
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    No ,the filter is fast.
    cloning is slower.

  6. #6
    Sweetu is offline Novice
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2016
    Posts
    19
    Quote Originally Posted by ranman256 View Post
    No ,the filter is fast.
    cloning is slower.
    I've 1 lac rows where filter takes 2 minutes to search and find the record...
    Some friends suggested to create ADODB connection to sql server and use ADODB record set...
    Can you please help there?

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

Similar Threads

  1. Replies: 7
    Last Post: 09-28-2023, 08:41 AM
  2. recordset clone method
    By vientito in forum Programming
    Replies: 1
    Last Post: 10-30-2014, 11:33 PM
  3. Output form recordset clone to word
    By silverspr in forum Programming
    Replies: 1
    Last Post: 02-07-2013, 01:32 PM
  4. RecordSet Clone Problem with code
    By rlsublime in forum Programming
    Replies: 8
    Last Post: 06-21-2012, 11:56 AM
  5. multiple combo boxes recordset clone
    By trigirl67 in forum Forms
    Replies: 1
    Last Post: 01-30-2012, 02:32 PM

Posting Permissions

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