Results 1 to 10 of 10

Thread: Run-time error 8577

  1. #1

    Thread Starter
    Hyperactive Member GingerNut's Avatar
    Join Date
    May 2002
    Location
    Are those my feet?
    Posts
    372

    Run-time error 8577

    Run-time error 8577

    Failed getting Rowset(s) from current data source



    OK guys, where did I go wrong?
    Here's my code:

    VB Code:
    1. Private Sub cmdAdd_Click()
    2. 'Add item to database
    3. cmdAdd.Enabled = False
    4. cmdSave.Enabled = True
    5. cmdDelete.Enabled = True
    6. dtaInventory.Recordset.AddNew
    7. txtItem.SetFocus
    8. End Sub
    9.  
    10. Private Sub cmdDelete_Click()
    11. 'Delete item from database
    12. Dim Rvalue As Integer
    13. Rvalue = MsgBox("Are you sure you want to delete this item?", vbQuestion + vbYesNo, "Delete Item")
    14. If Rvalue = vbNo Then Exit Sub
    15. dtaInventory.Recordset.Delete
    16. dtaInventory.Recordset.Requery
    17. dtaInventory.Recordset.MoveNext
    18. If dtaInventory.Recordset.EOF = True Then
    19.     dtaInventory.Refresh
    20.     If dtaInventory.Recordset.BOF = True Then
    21.         MsgBox "You must add a record.", vbOKOnly + vbInformation, "Empty File"
    22.         Call cmdAdd_Click
    23.     Else
    24.         dtaInventory.Recordset.MoveFirst
    25.     End If
    26. End If
    27. txtItem.SetFocus
    28. End Sub
    29.  
    30. Private Sub cmdNext_Click()
    31. 'Move to next item
    32. dtaInventory.Recordset.MoveNext
    33. If dtaInventory.Recordset.EOF Then dtaInventory.Recordset.MovePrevious
    34. txtItem.SetFocus
    35. End Sub
    36.  
    37. Private Sub cmdPrevious_Click()
    38. 'Move to previous item
    39. dtaInventory.Recordset.MovePrevious
    40. If dtaInventory.Recordset.BOF Then dtaInventory.Recordset.MoveNext
    41. txtItem.SetFocus
    42. End Sub
    43.  
    44. Private Sub cmdSave_Click()
    45. 'Check txtItem has been filled
    46. If txtItem.Text = "" Then
    47. Dim Response As Integer
    48. Response = MsgBox("Please enter an item", vbOKOnly + vbCritical, "Add item")
    49. Else
    50. 'Save item to database
    51. dtaInventory.Recordset.Update
    52. dtaInventory.Recordset.Requery
    53. cmdAdd.Enabled = True
    54. cmdSave.Enabled = False
    55. cmdDelete.Enabled = True
    56. txtItem.SetFocus
    57. End If
    58. End Sub
    59.  
    60. Private Sub mnuExit_Click()
    61. 'Exit Program
    62. Dim Response As Integer
    63. Response = MsgBox("Are you sure you want to exit?", vbYesNo + vbCritical + vbDefaultButton2, "Exit Program")
    64. If Response = vbNo Then
    65.     Exit Sub
    66. Else
    67.     End
    68. End If
    69. End Sub
    70.  
    71. Private Sub mnuPrint_Click()
    72. 'Show Printable Inventory
    73. dtaInventory.Recordset.Requery
    74. rptInventory.Refresh
    75. rptInventory.Show
    76. End Sub

    The error comes up when I try to view the data report
    How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?

    Global Freelancers | Web Traffic Analyser

  2. #2

    Thread Starter
    Hyperactive Member GingerNut's Avatar
    Join Date
    May 2002
    Location
    Are those my feet?
    Posts
    372
    Any ideas?

    When I originally wrote the prog I was using ME, but I upgraded to XP Pro a while back. Would that have something to do with it?
    How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?

    Global Freelancers | Web Traffic Analyser

  3. #3
    Lively Member
    Join Date
    Oct 2002
    Posts
    112
    Is the database path the same as it was before ie the same folder names?

    I haven't got XP pro but I have got XP home and it's my document folder for instance is not in the root directory as it is in Win98.

    Just a thought

    JFK

  4. #4

    Thread Starter
    Hyperactive Member GingerNut's Avatar
    Join Date
    May 2002
    Location
    Are those my feet?
    Posts
    372
    It's not the path.
    How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?

    Global Freelancers | Web Traffic Analyser

  5. #5
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    When is it erroring? as you open the form or as you do an amendment?


    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  6. #6

    Thread Starter
    Hyperactive Member GingerNut's Avatar
    Join Date
    May 2002
    Location
    Are those my feet?
    Posts
    372
    The error pops up when I try to show the data report.

    [Highlight=VB]
    Private Sub mnuPrint_Click()
    'Show Printable Inventory
    dtaInventory.Recordset.Requery
    rptInventory.Refresh
    rptInventory.Show
    End Sub
    [Highlight=VB]
    How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?

    Global Freelancers | Web Traffic Analyser

  7. #7
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    Are you sure the dtaInventory.Recordset is not opened as forward-only or some such type? Is the .Requery operation allowed on it?

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  8. #8

    Thread Starter
    Hyperactive Member GingerNut's Avatar
    Join Date
    May 2002
    Location
    Are those my feet?
    Posts
    372
    I've attached the heap, maybe it will be easier for someone to see what's wrong with it.
    Attached Files Attached Files
    How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?

    Global Freelancers | Web Traffic Analyser

  9. #9
    Fanatic Member
    Join Date
    Aug 2001
    Location
    Connecticut
    Posts
    855
    I see no datasource property set for the report.
    I don't see the connection string in the DE either.

    When I set them, it worked.
    VB 6.0, Access, Sql server, Asp

  10. #10

    Thread Starter
    Hyperactive Member GingerNut's Avatar
    Join Date
    May 2002
    Location
    Are those my feet?
    Posts
    372
    Damn, hadn't noticed that. Thanks ralph
    How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?

    Global Freelancers | Web Traffic Analyser

Posting Permissions

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



Click Here to Expand Forum to Full Width