Results 1 to 11 of 11
  1. #1
    Join Date
    Nov 2004
    Location
    Harrogate, N.Yorks, UK
    Posts
    83

    Unanswered: Record deletion anomoly

    Hello all.

    Has anyone ever come across a problem whereby a record on a main form is deleted using the record selector and delete key with two different outcomes? Sometimes the record deletes and leaves the fields blank and then on other occasions the next record immediatley appears giving the user the impression that the delete may not have worked.

    I'm a bit miffed as to the cause as there is no refresh or requery taking place and some records delete as expected when the same table is involved.

  2. #2
    Join Date
    Nov 2004
    Location
    Harrogate, N.Yorks, UK
    Posts
    83
    That's what I thought. Maybe there's something built in to Access where the problem only manifests itself on Cloudy days beginning with T where there is a South Westerly wind blowing at 23 mph, I'm wearing a black shirt and the guy outside just ran over a badger.

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Woot, HARROGATE!

    Can you tell me how you delete a record using the record selector?
    Generally I do not allow my users to do this, I control deletion via a command button if needs be!
    George
    Home | Blog

  4. #4
    Join Date
    Nov 2004
    Location
    Harrogate, N.Yorks, UK
    Posts
    83
    I've always had users deleting records with the record selector and delete key- it's just less hassle when there are subforms involved as I always avoid cascade deletes to make sure that the user is aware of what they are doing.

    For some reason, since I've gone to using one form (and using VBA to control the form state and field backcolours) instead of opening/closing seperate editable and non editable forms (as defined on the form properties)I'm having this particular problem on occasion. Sometimes the main form fields remain blank and sometimes the next record populates them. Somewhat puzzling.

    Yep- Yorkshire boy through and through!

  5. #5
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Are you aware of the On Delete event on a subform?
    Maybe you can whack a refresh/requery in there...
    George
    Home | Blog

  6. #6
    Join Date
    Nov 2004
    Location
    Harrogate, N.Yorks, UK
    Posts
    83
    Yup- I'm aware of it but that's what I don't want to happen. If a record is deleted I want the fields to remain blank until the Close button is used which returns the form to a non editable state and then a requery takes place and the form displays another record in the recordset.

    Instead what is happening on some occassions is that the delete key is pressed, the visible record is getting deleted and then the next record in the recordset immediately appears in it's place- this gives the user the impression that nothing has happened.

    I'm starting to wonder if it might be something to do with the sort order but it's slightly nonsensical...

  7. #7
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Could you provide a screenie or something? I'm finding it hard to picture what you mean now
    George
    Home | Blog

  8. #8
    Join Date
    Nov 2004
    Location
    Harrogate, N.Yorks, UK
    Posts
    83
    Unfortunately not- uploading from the PC is restricted. I may have found an avenue to explore with a sub-form which could be causing a cascaded refresh to the main form that I don't want to happen. One for tomorrow!

    Thanks for your time George.

  9. #9
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    You can feel free to send me a screenie via e-mail from the forum.
    good luck with your investigation anyhow!
    George
    Home | Blog

  10. #10
    Join Date
    Sep 2006
    Posts
    265
    Whilst I allow deletes to less than critical information, in critical areas deletions are only permitted in the Profroma stage of Invoicing, after that deletion is unavailable. I use a delete button to run a query which asks "Do you want to Delete" then closes the Form. This ensures that users confirms deletions and kicks them out of the form immediately afterwards.

    Simon

  11. #11
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I too use a messagebox prompt behind a command button - very simple and effective. However, I'd chose to display a blank, non-editable record rather than close the form
    George
    Home | Blog

Posting Permissions

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