Results 1 to 3 of 3
  1. #1
    malin7232 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    2

    Set rst = qdf.OpenRecordset(dbOpenSnapshot)


    Hi
    I have this code and need to convert from dao to ado
    Set dbs = CurrentDb()
    Set qdf = dbs.QueryDefs("Get Selected Growers")

    qdf.PARAMETERS("[Forms]![Faxes]![Year]") = Forms!Faxes!Year
    qdf.PARAMETERS("[Forms]![Faxes]![Order]") = Forms!Faxes!Order
    qdf.PARAMETERS("[Forms]![Faxes]![Suffix]") = Forms!Faxes!Suffix

    Set rst = qdf.OpenRecordset(dbOpenSnapshot)
    'Set rst = dbs.OpenRecordset(ctl.RowSource, dbOpenSnapshot)
    the statement in question is
    Set rst = qdf.OpenRecordset(dbOpenSnapshot)
    can anyone help by converting this to ADO or suggest another method. I am using ADO because the database has been moved to SQL server.
    Thanks

    Mike

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    DAO will work fine with linked SQL Server tables.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    malin7232 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    2

    dao is getting deprecated by microsoft is my understanding

    Quote Originally Posted by pbaldy View Post
    DAO will work fine with linked SQL Server tables.

    yes but DAO is being deprecated by ms by understanding. If anyone hows to convert it to ADO it would be a great help

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

Similar Threads

  1. QueryDefs.OpenRecordset problems
    By Ast2TheRgnlMgr in forum Access
    Replies: 2
    Last Post: 08-01-2016, 04:33 PM
  2. Too Few Parameters on .OpenRecordset()
    By Voodeux2014 in forum Forms
    Replies: 9
    Last Post: 01-28-2016, 04:45 PM
  3. Replies: 4
    Last Post: 01-06-2016, 10:32 AM
  4. db.OpenRecordset error
    By jscriptor09 in forum Programming
    Replies: 4
    Last Post: 01-27-2012, 12:17 AM
  5. OpenRecordset vs. Query
    By crispy-bacon in forum Programming
    Replies: 7
    Last Post: 07-04-2011, 09:52 AM

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