Results 1 to 3 of 3

Thread: delete problem

  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Thanked 0 Times in 0 Posts

    delete problem

    Delete problem

    I have a main form and a subform similar to those of
    Nortwind Database shipped with Access Microsoft.
    I have a delete command in the subform to delete a record.
    This is the following
    DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
    DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

    However the product does not disappear from the subform, and if i add
    other products in the same order, the deleted product stays on and can be deleted again.
    I have tried with a Requery command, but without success.

    The idea is, while i am adding products to a new order, to be able to delete a record,
    that is to say a product , in the process of preparing the order.
    What i want is to see the product disappear if i delete it.
    Can somebody help me?

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Crystal Beach, FL, Florida, USA
    Thanked 33 Times in 33 Posts

    Re: delete problem

    I think you will find it easier to use
    RunCommand accmdDeleteRecord
    instead of those old DoMenuItem commands.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    3 Star Lounger
    Join Date
    Dec 2000
    Thanked 0 Times in 0 Posts

    Re: delete problem

    Either method should work. What version of Access?

    A little more detail would help ...
    How are you calling this delete command - is it attached to a button on the subform that you click? Has the record been saved before you try to delete it (Otherwise you may see it on the form, but it isn't actually in the table)? Is the record indicator positioned on the record that you want to delete? Do you get any messages at all (You should get a window that says you are about to delete a record unless you turned the warnings off)? Look in the table and tell us if the record is there before and after you try to delete it.

Posting Permissions

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