Results 1 to 3 of 3
  1. #1
    sergran is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    115

    Closing mask if non-zero value

    Hello, I need your help .... I should set up a condition which must be closed if the list has a mask of values
    The mask contains a text box (list) on which associtata not appear in a list.
    .


    I wrote
    [code] If KeyCode = vbKeyEscape And Len (list)> 0 Then
    btnClose_Click
    End If [/ code]

    and I also tried with
    [code] If KeyCode = vbKeyEscape And Not IsNull (Me.lista.value) Then
    btnClose_Click
    End If [/ code]

    but the part in red cancels the command. In fact, I porvato to REMOVE and funziona.Come should I change the code?
    thanks
    Hello
    Last edited by RuralGuy; 09-19-2013 at 07:46 AM. Reason: Translated the title

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Try nesting the conditions:

    If KeyCode = vbKeyEscape Then
    If Not IsNull(Me.lista) Then btnClose_Click
    End If

    But that will allow non number values. Should this be limited to numbers?


    Note that the ending CODE tag is [/code] without a space.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    sergran is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    115
    Thanks very much!!!!!!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Apertura maschera se dato presente
    By sergran in forum Programming
    Replies: 6
    Last Post: 08-27-2013, 09:27 AM
  2. Valore null
    By sergran in forum Programming
    Replies: 3
    Last Post: 08-26-2013, 09:21 AM
  3. Valore Null
    By sergran in forum Programming
    Replies: 8
    Last Post: 08-11-2013, 02:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums