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

    Post Select all only where conditions is met

    Hi I have the following 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) Then
    !SEND_MAIL = True
    !FLAGED_BY = fOSUserName()
    End If
    .Update
    End With
    rstBUYList.MoveNext
    Loop
    End If
    Me.Requery
    End Sub
    So far everything eorks fine. But I got to change it. I have this button that says select all, and the above code does it.
    What I need is to select only those where a control condition is met
    : smth like : select all where order is null.
    how could I add that in the code...I tried some versions but it did not worked...
    any ideas?

    Webisti

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Your code already shows conditional structure. If you have more criteria then expand the If Then condition to include them.
    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.

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

Similar Threads

  1. Conditions In Form
    By drunkenneo in forum Forms
    Replies: 1
    Last Post: 06-21-2013, 02:15 PM
  2. Select Random Records Based on Conditions
    By access123 in forum Queries
    Replies: 1
    Last Post: 10-27-2010, 10:25 AM
  3. Sum Column with conditions
    By g8rnc in forum Access
    Replies: 1
    Last Post: 06-10-2010, 09:59 AM
  4. if...then conditions ???
    By em07189 in forum Access
    Replies: 6
    Last Post: 03-05-2010, 10:29 PM
  5. Conditions / Expressions
    By Mark344 in forum Access
    Replies: 1
    Last Post: 02-19-2010, 08:15 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