Error # 3091 in VBA, No current record found

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • razamzai
    New Member
    • Dec 2014
    • 1

    Error # 3091 in VBA, No current record found

    I noticed that when SQL statement does not return a record then null string causes the Err # 3091. First we have to handle this error and then suggest accordingly.lik e ....

    function()
    on error goto xErr
    sql statement......
    .............
    .......
    xErr:
    if err.number=3091 then
    resume next
    your code when sql statement...... fails to return.
    end if
    end function

    Thnx
Working...