+ Reply to Thread
Results 1 to 6 of 6

Error 3065: Cannot execute a select query.

  1. #1
    Registered User
    Join Date
    11-10-2020
    Location
    Kanpur
    MS-Off Ver
    16
    Posts
    4

    Error 3065: Cannot execute a select query.

    I am running this code and when running the code, this error msg shows up," Error 3065: Cannot execute a select query. ". it debugs on this line

    Please Login or Register  to view this content.
    Please help me with this

    Please Login or Register  to view this content.

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Error 3065: Cannot execute a select query.

    What would you expect that line to achieve? A SELECT query returns records but you aren't attempting to store the result in a recordset.
    Rory

  3. #3
    Registered User
    Join Date
    11-10-2020
    Location
    Kanpur
    MS-Off Ver
    16
    Posts
    4

    Re: Error 3065: Cannot execute a select query.

    how to store ?

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Error 3065: Cannot execute a select query.

    Same way you did it here:

    Please Login or Register  to view this content.
    You can use SQL strings as well as simple table/view names.

  5. #5
    Registered User
    Join Date
    11-10-2020
    Location
    Kanpur
    MS-Off Ver
    16
    Posts
    4

    Re: Error 3065: Cannot execute a select query.

    so what will the code become
    ?

  6. #6
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Error 3065: Cannot execute a select query.

    Please Login or Register  to view this content.
    for example.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] execute code after finished refresh web query connection
    By mrkhchan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-09-2015, 10:22 AM
  2. IF cell=error execute sub 1 if value execute sub 2... possible?
    By CDNcameron in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-31-2013, 05:28 PM
  3. [SOLVED] rum time error 3065
    By Lloyd Blankfein in forum Access Programming / VBA / Macros
    Replies: 6
    Last Post: 03-14-2013, 08:32 AM
  4. [SOLVED] Running Macro Twice to Execute VBA Query
    By zhb12810 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-20-2012, 12:12 PM
  5. Execute stored procedure using ms query & vba
    By astrodon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-14-2008, 07:56 PM
  6. How can I execute this query?
    By wliong in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2006, 03:30 PM
  7. Execute Macro once Microsoft Query results complete
    By gwa3000 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-19-2005, 04:35 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1