Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. "Operation not allowed when object is open"

"Operation not allowed when object is open"

Scheduled Pinned Locked Moved Visual Basic
helpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mcm
    wrote on last edited by
    #1

    ElseIf optSuppOrder.Value = True Then Load deMain With deMain .SupplierOrderAudit_Grouping txtUser.Text, CDate(Text5.Text), CDate(Text6.Text) End With SupplierOrderAudit.Refresh If SupplierOrderAudit.Visible = False Then SupplierOrderAudit.Show End If End If if the above option button is chosen, the intended purpose is that the report is generated. However, occasionally, when the command button is pressed, it throws the above run time error pointing to the report line, why is this? any help would be greatly appreciated or if you need any additional info.

    R R 2 Replies Last reply
    0
    • M mcm

      ElseIf optSuppOrder.Value = True Then Load deMain With deMain .SupplierOrderAudit_Grouping txtUser.Text, CDate(Text5.Text), CDate(Text6.Text) End With SupplierOrderAudit.Refresh If SupplierOrderAudit.Visible = False Then SupplierOrderAudit.Show End If End If if the above option button is chosen, the intended purpose is that the report is generated. However, occasionally, when the command button is pressed, it throws the above run time error pointing to the report line, why is this? any help would be greatly appreciated or if you need any additional info.

      R Offline
      R Offline
      RHYS
      wrote on last edited by
      #2

      Just plucking at straws but the error may occur if deMain is already loaded (e.g. not unloaded properly from a previous report???). Maybe you should look into creating a new instance of deMain each time you need a report.... If this isn't where you are receiving the errors thenignore my post :) Rhys Kirk

      1 Reply Last reply
      0
      • M mcm

        ElseIf optSuppOrder.Value = True Then Load deMain With deMain .SupplierOrderAudit_Grouping txtUser.Text, CDate(Text5.Text), CDate(Text6.Text) End With SupplierOrderAudit.Refresh If SupplierOrderAudit.Visible = False Then SupplierOrderAudit.Show End If End If if the above option button is chosen, the intended purpose is that the report is generated. However, occasionally, when the command button is pressed, it throws the above run time error pointing to the report line, why is this? any help would be greatly appreciated or if you need any additional info.

        R Offline
        R Offline
        RichardGrimmer
        wrote on last edited by
        #3

        The error you mention generally occurrs when attempting to open an ADODB.Recordset object when it's already open - if you're reporting from a DB, this will prob be the cause, but suspect that it won't be in your code? Does that help? "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups