+ Reply to Thread
Results 1 to 2 of 2

SQL Loop Problem Run-time error '3705':

  1. #1
    Registered User
    Join Date
    05-17-2011
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2003
    Posts
    2

    Unhappy SQL Loop Problem Run-time error '3705':

    hello! i'm just new in here.. I started practicing vba programming since yesterday... pls help me on my problem...

    I've already connected my records at ms access.. the macro i made is only runnable at 1st row of my table.. so i made a loop to fill up the next rows with data..

    but i got these error..

    Run-time error '3705':
    Operation is not allowed when the object is open

    here's my code:
    ________________________________________
    Please Login or Register  to view this content.
    _________________________________________

    I got the logic but i don't know how to code it properly..

    still got many questions to ask.. but my priority was this one.. help me plz.. thanks in advance
    Last edited by romperstomper; 05-18-2011 at 03:01 AM. Reason: add code tags.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: SQL Loop Problem Run-time error '3705':

    You are trying to open the recordset repeatedly in your loop without closing it, or doing anything with it, and that makes no sense.
    It's not clear to me whether you expect multiple records to be returned for each query that you do - if not, there is no need for the movenext; just open the recordset, output the values you want, close the recordset then loop.
    Remember what the dormouse said
    Feed your head

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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