Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Delete Last Record in a Sub Form? (A2k (9.0.3821) SR-1)

    Delete Last Record in a Sub Form?

    A2k (9.0.3821) SR-1

    If I

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Delete Last Record in a Sub Form? (A2k (9.0.3821) SR-1)

    If your Sub records have a field with an incrementing autonumber, test in the Before Del Confirmation of the subform if there is a greater number in the record source from the subform than the one in the deleted record.
    Francois

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Delete Last Record in a Sub Form? (A2k (9.0.3821) SR-1)

    Define what you mean by the "last" record. Are you trying to figure out whether there are any records left, whether you're on the "new" record, or what?
    Charlotte

  4. #4
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Delete Last Record in a Sub Form? (A2k (9.0.3821) SR-1)

    Hi Charlotte

    In the Delete Record code for sub form, after the last record is deleted in sub form, focus on new record, test to see if sub form is empty.

    I think Francois is on right track, test for null sub form record autonumber on each delete, I'm on the road and have not yet tried this.

    Can can comment on this approach.

    Thank, John

Posting Permissions

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