Results 1 to 3 of 3

Thread: Delete a record on a bound form...

  1. #1

    Thread Starter
    Hyperactive Member rockies1's Avatar
    Join Date
    Jul 1999
    Location
    Stuck at work
    Posts
    375

    Delete a record on a bound form...

    I have a bound form using a DataControl.

    I need to be able to click a button and delete the current record and then move to the next record (or the previous record if there is no next record)

    When I try:
    Code:
    Private Sub Command2_Click()
        Data1.Recordset.Delete
        Data1.Recordset.MoveNext
    End Sub
    I get error # 3426 reading: This action was cancelled by an associated object.

    How can I make this work?

    Thanks!
    Morgan
    [email protected] - Home
    [email protected] - Work
    Using VB6 SP6 but trying to learn VB2005EE

  2. #2
    Frenzied Member oh1mie's Avatar
    Join Date
    Sep 2001
    Location
    Finland
    Posts
    1,043

    Re: Delete a record on a bound form...

    Originally posted by rockies1
    I have a bound form using a DataControl.

    I need to be able to click a button and delete the current record and then move to the next record (or the previous record if there is no next record)

    When I try:
    Code:
    Private Sub Command2_Click()
        Data1.Recordset.Delete
        Data1.Recordset.MoveNext
    End Sub
    I get error # 3426 reading: This action was cancelled by an associated object.

    How can I make this work?

    Thanks!
    Properties window - Read only -> true ???
    oh1mie/Vic


  3. #3

    Thread Starter
    Hyperactive Member rockies1's Avatar
    Join Date
    Jul 1999
    Location
    Stuck at work
    Posts
    375
    No.

    In fact, it does delete the record, it just doesn't let me move after it does...
    Morgan
    [email protected] - Home
    [email protected] - Work
    Using VB6 SP6 but trying to learn VB2005EE

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