deleting records

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • didacticone
    Contributor
    • Oct 2008
    • 266

    deleting records

    I have a form based off a table called open jobs... info on this form is printed out and given to workers to complete the task, once finished, the jobsite is inspected and if approved a finished button is clicked which runs a query sending that record to different table.

    If it is disapproved a check box is ticked and a button is pressed that sends a copy of the record over to a disapproved table. Every time the disapproved button is hit it adds another record to the disapproved table along with the current date. This works great.

    How can I, after a job has been disapproved but then redone correctly, remove those records from the disapproved table? all of the tables have a unique id field, i just cant figure out a proper query. I need it to look in the disapproved table for ids matching the current record on my form and delete them. is this possible?
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    Your basic design here is flawed. You're violating a major relational database rule by having identical information stored in multiple tables. You should a single table with a Yes/No field to indicate whether the inspection declared the job approved or disapproved. If need be, you can have another such field to indicate if the job is open or closed.

    Linq ;0)>

    Comment

    • didacticone
      Contributor
      • Oct 2008
      • 266

      #3
      im relatively new at databases and learning on the go here, now what are the consequences of having the same information stored in multiple tables? just for my own knowledge.

      Comment

      • nico5038
        Recognized Expert Specialist
        • Nov 2006
        • 3080

        #4
        Check this article: http://bytes.com/topic/access/insigh...ble-structures

        Duplicate info will cause trouble when it's not "in line"....

        Nic;o)

        Comment

        Working...