Results 1 to 4 of 4
  1. #1
    auerdl is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    6

    what does this code do

    The below code was posted by spideynok. my greatest thanks!!



    can someone tell me what this bit of the below code does... I have much to learn

    Replace(" OR ([EmployeeName] Like '*%F*')", _
    "%F", strFilters(intX))




    Private Sub Command25_Click()
    Dim strFilter As String, strFilters() As String
    Dim intX As Integer

    With Me
    strFilters = Split(Nz(.Text23, ""), ",")
    For intX = 0 To UBound(strFilters)
    strFilter = strFilter & _
    Replace(" OR ([EmployeeName] Like '*%F*')", _
    "%F", strFilters(intX))
    Next intX
    .Filter = Replace(Mid(strFilter, 5), "'", Chr(34))
    .FilterOn = (.Filter > "")
    End With
    End Sub

  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,642
    It replaces "%F" with whatever is contained in the variable.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    Should this stray into how to remove any spaces after a character, know that this code is posted in a question thread in this forum and elsewhere by this poster. Poster has already been informed of cross posting etiquette, so no need to repeat that.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    auerdl,

    There is no need to create a new thread regarding the same issue.
    Your similar post https://www.accessforums.net/showthread.php?t=60837 was the place to ask this question.

    If you are discussing the same topic, please continue in the same thread.
    If you don't understand, or have issues with a response(s), then focus on the issue and provide more info.

    Also, in your other thread, there is a response specific to cross posting --asking the same/similar question on multiple forums. Please read it.

    Good luck with your project.

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

Similar Threads

  1. Replies: 20
    Last Post: 10-13-2015, 09:05 AM
  2. Replies: 3
    Last Post: 10-16-2014, 08:49 AM
  3. Replies: 4
    Last Post: 03-10-2014, 12:18 PM
  4. Replies: 7
    Last Post: 05-28-2013, 09:11 AM
  5. Replies: 1
    Last Post: 05-04-2013, 12:19 PM

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