Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Kendrick, Idaho, USA
    Posts
    277
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Delete and update at the same time? (2002)

    I have an inventory of unique items (ITEMS table). The user selects from this list for a shipment. Each record is then marked

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Delete and update at the same time? (2002)

    Do you really need a record in the SHIPMENT table and a flag (Shipped = True) in the ITEMS table? You could determine which items have Shipped = True from the SHIPMENT table. You could create a query that returns shipped items:

    SELECT * FROM ITEMS WHERE ItemID In (SELECT ItemID FROM SHIPMENT)

    and a query that returns non-shipped items:

    SELECT * FROM ITEMS WHERE ItemID Not In (SELECT ItemID FROM SHIPMENT)

    (ItemID is a made-up name for the unique identifier of items; replace this with the name you use)

    <img src=/w3timages/blueline.gif width=33% height=2>

    About your other question: I think that after deleting a record, the focus shifts to the first control in the tab order, in the record that was the next record before the current record was deleted.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Kendrick, Idaho, USA
    Posts
    277
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Delete and update at the same time? (2002)

    Hans,
    Thank you for your reply and advice. Putting an SQL statement in a criteria never seems to occur to me

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Delete and update at the same time? (2002)

    Could you provide some more details about the tables and forms involved? Or perhaps, post a stripped down version of the database?
    <UL><LI>Make a copy of the database and work with that.
    <LI>Remove all database objects (tables, queries, forms, reports, macros and modules) that are not relevant to the problem.
    <LI>In the remaining table(s), remove most records - leave only the minimum number necessary to demonstrate the problem.
    <LI>Remove or modify data of a confidential nature.
    <LI>Do a compact and repair (Tools/Database Utilities).
    <LI>Make a zip file containing the database; it should be below 100KB.
    <LI>Attach the zip file to a reply.[/list]This will make it easier for Loungers to help.

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Kendrick, Idaho, USA
    Posts
    277
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Delete and update at the same time? (2002)

    The attached file will demonstrate (I hope) the problem. Thank you.
    Attached Files Attached Files

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Delete and update at the same time? (2002)

    Would a form with two list boxes work? I have attached an example, based on your table and form. (This one uses the Shipped field instead of the Shipped table.)
    Attached Files Attached Files

Posting Permissions

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