Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2005
    Posts
    183

    Question Unanswered: Prevent deletion?

    I'm looking for a way to prevent the deletion of a record, based on a field value.

    Something similar to:

    Code:
    If IsNull(txt_faknr.Value) = False Then
     "Cancel deletion action"
    End
    Perhaps to be insert in BeforeDelConfirm?

    Cheers and thanks for your time,

    Trinsan
    IT squid: networks, servers, firewalls, routers and I dabble a little with SQL-server and Access as well....

  2. #2
    Join Date
    Apr 2004
    Location
    Derbyshire, UK
    Posts
    789
    Provided Answers: 1
    Hi Trisan

    You could try looking at the On Delete or Before Del Confirm form events ?

    ie something like

    Code:
    Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
        If Not IsNull(txt_faknr) Then Cancel = True
    End Sub

    MTB

  3. #3
    Join Date
    Oct 2005
    Posts
    183
    Thats exactly where I wanna go.

    I'll play around some more... apparently, when working with continuos forms, some form settings affect all shown records, rather than just the current one.

    Cheers, Trin
    IT squid: networks, servers, firewalls, routers and I dabble a little with SQL-server and Access as well....

Posting Permissions

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