Professional Web Applications Themes

Unable to delete from a form, because the record source is a query. - Microsoft Access

Hello All, I have a form that uses a query, qryProject, as its record source. When I use the delete function, it tells me that it cannot delete because there are related records in tblProject. Is there a way to delete this record in the form? When I push the delete function, the record is deleted from tblProject, etc. Thanks for any feedback, and if you need me to clear anything up, just tell me. - Andy...

  1. #1

    Default Unable to delete from a form, because the record source is a query.

    Hello All,

    I have a form that uses a query, qryProject, as its record
    source.

    When I use the delete function, it tells me that it cannot
    delete because there are related records in tblProject.

    Is there a way to delete this record in the form? When I
    push the delete function, the record is deleted from
    tblProject, etc.

    Thanks for any feedback, and if you need me to clear
    anything up, just tell me.

    - Andy
    Andy Guest

  2. #2

    Default Unable to delete from a form, because the record source is a query.

    Hello again,

    I sort of solved my problem. I made it so that the delete
    button would run a delete query. All seemed well, until...

    When the delete query runs all of the fields come up
    with "#deleted". I thought that maybe if I refreshed the
    form that this would work, but I need to close the form
    and then reopen it for that record to leave. Is there a
    way to solve this problem?

    Thanks for the help.

    Andy 
    record 
    cannot 
    Andy Guest

  3. #3

    Default Re: Unable to delete from a form, because the record source is a query.

    On Tue, 5 Aug 2003 06:56:18 -0700, "Andy Chicas" <gov>
    wrote:
     

    Open the Tables design window, and then the Relationships window.
    Select the join line (or lines) from tblProjects to any tables related
    "many" to tblProjects' "one". Check the "Cascade Deletes" option on
    this relationship.

    Warning: cascading deletes is powerful but thereby risky. You can
    delete a whole LOT of records, possibly without intending to do so; if
    you find later that you needed these records (say for historical
    purposes, or for billing) too bad - they are gone forever and cannot
    be recovered.

    John W. Vinson[MVP]
    Come for live chats every Tuesday and Thursday
    http://go.compuserve.com/msdevapps?loc=us&access=public
    John Guest

Similar Threads

  1. Delete form - Post data to a table and delete uponsubmit.
    By FusionRed in forum Coldfusion - Getting Started
    Replies: 3
    Last Post: July 28th, 01:27 PM
  2. How do you delete a record form multiple tables
    By Mike in forum ASP Database
    Replies: 7
    Last Post: December 18th, 05:50 PM
  3. When there's no available record for listbox row source.
    By Nick Mirro in forum Microsoft Access
    Replies: 0
    Last Post: July 29th, 08:33 PM
  4. Adding a new record when the record source is a query.
    By Andy in forum Microsoft Access
    Replies: 0
    Last Post: July 29th, 01:41 PM
  5. Extra record source
    By Warrio in forum Microsoft Access
    Replies: 5
    Last Post: July 1st, 02:23 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139