Results 1 to 9 of 9
  1. #1
    xseper is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    5

    changing OrderBy in code affect 3709 runtime error

    hello

    This is my situation:
    I want to change order ater clicking button
    i found this code:
    Code:
    Me.OrderBy = "Something"
    Me.OrderByOn = True
    But always i recive error
    runtime error 3709 : The search key was not found in any record
    What intresting i recive this error even if my code looks like that:
    Code:
    Me.OrderBy = Me.OrderBy
    Me.OrderByOn = True


  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    I tested this code and it works.

    The value must be a field name. For instance, my form opens sorting by Lastname and now want to order by ZipCode field:

    Me.OrderBy = "ZipCode"
    Me.OrderByOn = True

    If the field name has spaces or special characters, use [] or use just to be safe use anyway: "[ZipCode]"
    Last edited by June7; 04-02-2012 at 03:55 AM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    xseper is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    5
    Ofcorse, but if i enter any of my fields (even curent value) there is error


    in new empty file it works fine;/ but in my project no.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    If you want to provide the project I will test. Might be corruption issue.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    xseper is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    5
    i cant post my project here - this is data that should not be avalible for everyone in internet. But i can send you by mail.

    Plese pv me Your adress

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    And you trust me why? Don't care about data. Make copy and remove confidential data. Or upload to a fileshare site such as Box.net. Post url link to file in thread or send me PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    xseper is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    5
    Ok i sendet

    this data is not confidential, is just not to public use. I dont want situation like someone in future by accident find it and i will have problems.
    Cleaning data is alot of work - this database is big.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    What kind of problems would you anticipate someone having if they explored your project? I can open only Windows Compression zip, not rar files.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    xseper is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    5
    Problem is soloved!

    I opened this file on my friend computer. It turned up that my access gived me bad error; the true one was "to many tables opend" (or somethink similar). I count and in this query i had opend 18+ tables; i modificated 2 queries to decrese this number, and my sorting started to work proper.


    Thanks!

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

Similar Threads

  1. 3709 Error -- HELP!!
    By EHittner in forum Access
    Replies: 3
    Last Post: 11-28-2011, 09:17 AM
  2. Run-Time error '3709'
    By jscriptor09 in forum Access
    Replies: 2
    Last Post: 07-03-2011, 12:29 PM
  3. RunTime Error 3075, code for search button
    By jacie in forum Programming
    Replies: 1
    Last Post: 04-15-2011, 05:23 AM
  4. Runtime error in preventing duplicates code
    By emilyrogers in forum Access
    Replies: 10
    Last Post: 10-07-2010, 08:14 AM
  5. Code works in full, fails in Runtime
    By stephenaa5 in forum Programming
    Replies: 3
    Last Post: 09-14-2010, 12:30 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