Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Error deleting Record (2000)

    Hi All!

    I am posting a stripped down database with frmPaymentEdit which contains a subform frmPaymentAllocationsEdit. There is a listbox in the upper left corner called lstFindPayment. When this list is clicked, the corresponding payment record is made current in both forms. This is where I
    Attached Files Attached Files

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Error deleting Record (2000)

    Why do you want to use another form (frmPaymentEdit) to edit the Payment details when you already have form frmPaymentAdd that could do the same thing?
    Behind the command button to open the form frmPaymentEdit you have code that opens this form twice.
    I would tend to use frmPaymentAdd to do all the Adds or Edits that you wish. I would also put a button to delete allocations for a particular payment in the case of where a user mucks up the allocations, but this last point is totally up to you. You may think that the users are not up to it.

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Error deleting Record (2000)

    Ah, poor Pat trying to figure out my logic again. <img src=/S/crazy.gif border=0 alt=crazy width=15 height=15> I knew that question would be asked. I'm giving the user the ability to edit or post based on the form they are on. Since I want the form to open to the AccountID already active on the form that is current I needed to recreate frmAdd as another form to get the parameters correct in the lists/etc. I'm sure it seems nuts to you, but in my office the users consistenly C/O the scheduling program we presently have as being one where they "can't get to form easy enough" or "they can't remember how to get there" etc. <img src=/S/crybaby.gif border=0 alt=crybaby width=15 height=15>. I'm trying to eliminate the issues.

    I'm not sure where you're going with the delete button as there is one on the form and its where I'm getting the error. I wasn't aware that I had code X2 behind the button. I thought I'd removed that!

    Leesha

  4. #4
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Error deleting Record (2000)

    Pat, I just removed the code I didn't need behind the command button but still get the error message when trying to delete a record.

    Leesha

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Error deleting Record (2000)

    Are you trying to delete the record in frmPaymentEdit or frmPaymentAdd? If you are trying it in frmPaymentEdit you will have a problem since frmPaymentAdd has it as it's current record.

  6. #6
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Error deleting Record (2000)

    I'm trying to delete it from frmPaymentEdit. So if I understand correctly, if I have frmPaymentAdd close when the user opens frmPaymentEdit, the issue should go away???

    Leesha

  7. #7
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Error deleting Record (2000)

    Oh well, so much for that one. If I close frmPaymentAdd when frmPaymentEdit opens, then the links telling what AccountID to sort the various lists with are gone and I get parameter issues, which is why I didn't close the form to begin with. I'm gonna have to stew over this one while I'm sleeping!

    Leesha

  8. #8
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Error deleting Record (2000)

    You should be able to get rid of the parameter errors because you have the AccountID in the record source of frmPaymentEdit. Just define an invisible field called txtAccountID that is based upon AccountID and change the 3 references to it. You then don't need to keep the frmPaymentAdd form open.

  9. #9
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Error deleting Record (2000)

    Cool! I didn't know I could do this. Now you'll need to point me in the right direction of where to put TextAccountID?? Is that in a query, an unbound control that I then make invisible??

    Thanks,
    Leesha

  10. #10
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Error deleting Record (2000)

    No, textAccountID is just a bound control on the header of form frmPaymentEdit.

  11. #11
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Error deleting Record (2000)

    I have made a few changes to your DB, be sure to keep it apart from the other databases you have just in case you override the wrong one.
    Attached Files Attached Files

  12. #12
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Error deleting Record (2000)

    Thanks Pat!! You're spoiling me!

    Leesha

  13. #13
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Error deleting Record (2000)

    I notice that you say it's A2000 but the databases you send are A97. Is there any reason for this?

  14. #14
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Error deleting Record (2000)

    Whenever I strip them down, even after compacting and repairing, they are still too big so Hans suggested this. It works everytime. I just assumed you then convert it to 2000.

    Leesha

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

    Re: Error deleting Record (2000)

    This is just to confirm that I am guilty of this tip to Leesha <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Since Access 97 doesn't use Unicode, a database in Access 97 format tends to be a lot smaller than the equivalent in Access 2000 format.

Page 1 of 2 12 LastLast

Posting Permissions

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