Results 1 to 4 of 4
  1. #1
    sksriharsha is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    3

    select records in recordset

    Hi,
    SQL select command does not seem to work when I am saying

    "set <rst> = <db>.openrecordset(<sqlstring>).

    I have tried everything. The error that comes on is that the no of parameters is less or some thing like that

    Instead, now I am trying to use a "do until <rst>.eof " loop with a if-then-else statement to select records.



    While I am using this method can anyone tell me

    1. how to copy records that are selected (all fields) into a temp table which has the same structure as the source table?

    2. how to delete all the records in the temp table once I have finished using it ?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922

  3. #3
    sksriharsha is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    3

    select and transfer to another table in same db

    Thanks for the reply, but in my case both the tables (source table and temp table) are in the same db.

    Is there no other simple solution ?

    Is something to be enabled before using a SQL statement ?

    Because a simple "select * from <sourcetable> where field1=<somevalue>" command does not seem to work.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It should work just fine with both tables in the same db. Have you enabled your code and macros yet?

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

Similar Threads

  1. Sorting data in ADO Recordset
    By martinjamesward in forum Programming
    Replies: 1
    Last Post: 08-28-2009, 05:38 AM
  2. ADO.Recordset - Write
    By Marvin in forum Programming
    Replies: 0
    Last Post: 07-17-2009, 07:56 AM
  3. Access 2003 returns empty recordset
    By Leelers in forum Queries
    Replies: 0
    Last Post: 03-20-2009, 11:11 AM
  4. Create a recordset for a report
    By vjboaz in forum Programming
    Replies: 0
    Last Post: 11-18-2008, 03:28 PM
  5. Add new Recordset using Recorset by Query
    By gailoni in forum Programming
    Replies: 1
    Last Post: 10-22-2008, 11:52 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