Results 1 to 2 of 2
  1. #1
    webisti is offline The Wisher
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    115

    Deselect all

    Hi Guys

    I gave a code that runs well on selecting items :
    Code:
    Private Sub Sselect_all_Click()
    Set rstBUYList = Me.RecordsetClone
    If rstBUYList.RecordCount <> 0 Then
        rstBUYList.MoveFirst
        Do While Not rstBUYList.EOF
                With rstBUYList
                    .Edit
                    If IsNull(!FLAGED_BY) And IsNull(!PURCHASE_ORDER) Then
                        !SEND_MAIL = True
                        !FLAGED_BY = fOSUserName()
                                        End If
                    .update
                End With
            rstBUYList.MoveNext
        Loop
    End If
    Me.Requery
    End Sub
    I need to change it, so that after the user is sending the mail to deselect the items where the FLAGED_BY = fOSUserName()
    It was working fine until the FLAGED_BY was just populated with username but now is populated also with value : AUTO, therefore the auto deselection won`t work anymore.


    Any ideas?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    So are you saying the field is never Null now? You can test for it containing more than "AUTO" with:

    If Len(!FLAGED_BY) > 4 Then
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Deselect Multiple yes/no check boxes
    By OCStan in forum Access
    Replies: 3
    Last Post: 09-09-2013, 01:05 PM
  2. prevent deselect items in the listbox after right click
    By masoud_sedighy in forum Programming
    Replies: 1
    Last Post: 08-13-2013, 01:06 AM
  3. Design View - deselect all fields
    By nagileon in forum Access
    Replies: 5
    Last Post: 02-18-2011, 10:37 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