• delete problem

    Author
    Topic
    #357013

    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?

    Viewing 1 reply thread
    Author
    Replies
    • #529533

      I think you will find it easier to use
      RunCommand accmdDeleteRecord
      instead of those old DoMenuItem commands.

    • #529557

      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.

    Viewing 1 reply thread
    Reply To: delete problem

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: