Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Non-Delete Delete (A2003)

    Non-Delete Delete

    Never one to trust what a user can do to themselves, particularly in the area of deleting records, I
    Cheers,
    Andy

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

    Re: Non-Delete Delete (A2003)

    You can save the record (RunCommand acCmdSaveRecord) and requery the form (Me.Requery). Since your form only displays records with Archived = 0, the "deleted" record will disappear from view when the form is requeried.

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Non-Delete Delete (A2003)

    Cool! Only 5 minutes this time! Totally amazing.

    While I have you on the line, I tried setting up the whole delete routine in a Public Function, but the System threw up electronically when I tried to say:

    [Archived] = -1

    Which tells me there has to be a way to refer to a specific field. I made sure that the field was always Archived in all tables with the hope that I could use the Public Function.

    Anyway, Hans, thanks again,
    Cheers,
    Andy

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

    Re: Non-Delete Delete (A2003)

    Even if Archived is a field in all tables, that does not mean that you can refer to it without further qualification in a standard module. Try

    CodeContextObject.[Archived] = -1

    CodeContextObject refers to the database object that is running the code, in this case your form.

  5. #5
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Non-Delete Delete (A2003)

    Three Minutes!!! I had to turn around to see if you were sitting behind me.

    Thanks Hans,
    Cheers,
    Andy

Posting Permissions

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