Macro converter has a few bugs. See if below mods work for you...
Just copy and paste to replace entire sub.
There's similar code in SearchGo_Click, but it seems to never be executed.
Code:
Private Sub SearchGo_GotFocus()
On Error GoTo SearchGo_GotFocus_Err
'If (Eval("[Form]![SearchBox] Is Null Or [Form]![SearchBox]=""""")) Then
If Len(Me.SearchBox & vbNullString) = 0 Then
DoCmd.ApplyFilter "", """""", ""
DoCmd.GoToControl "SearchBox"
DoCmd.SetProperty "SearchClear", acPropertyVisible, "0"
DoCmd.SetProperty "iconSearchClear", acPropertyVisible, "0"
DoCmd.SetProperty "SearchGo", acPropertyVisible, "-1"
DoCmd.SetProperty "iconSearchGo", acPropertyVisible, "-1"
End If
'If (Eval("[CurrentProject].[IsTrusted] And ([Form]![SearchBox] Is Null Or [Form]![SearchBox]="""")")) Then
If [CurrentProject].[IsTrusted] And (Len(Me.SearchBox & vbNullString)) = 0 Then
Me.SearchBox.Text = ""
End If
'If (Eval("[Form]![SearchBox] Is Null Or [Form]![SearchBox]=""""")) Then
If Len(Me.SearchBox & vbNullString) = 0 Then
End
End If
If VarType(Me.SearchBox) <> 8 Then
End
End If
DoCmd.SetProperty "SearchGo", acPropertyVisible, "-1"
DoCmd.SetProperty "iconSearchGo", acPropertyVisible, "-1"
'If (Eval("([Form]![SearchBox] Is Null Or [Form]![SearchBox]="""") And [SearchClear].[Visible]<>0")) Then
If Len(Me.SearchBox & vbNullString) = 0 And [SearchClear].[Visible] <> 0 Then
DoCmd.SetProperty "SearchClear", acPropertyVisible, "0"
End
End If
TempVars.Add "strSearch", Replace(Forms!F123_N1S_BilletList!SearchBox, """", """""")
TempVars.Add "strFilter", "([Ra_BIN] Like ""*" & [TempVars]![strSearch] & "*"" )"
TempVars.Add "strFilter", TempVars!strFilter & " OR ([Ra_Billet_Title] Like ""*" & [TempVars]![strSearch] & "*"" )"
TempVars.Add "strFilter", TempVars!strFilter & " OR ([Ra_Bin] Like ""*" & [TempVars]![strSearch] & "*"" )"
'Notice spaces before and after stars below. I removed them in the 3 lines above.
'I don't know why the converted code is referencing the fields that don't exist below...
'TempVars.Add "strFilter", TempVars!strFilter & " OR ([TFF_BSC] Like "" * " & [TempVars]![strSearch] & " * "" )"
'TempVars.Add "strFilter", TempVars!strFilter & " OR ([N_Code] Like "" * " & [TempVars]![strSearch] & " * "" )"
'TempVars.Add "strFilter", TempVars!strFilter & " OR ([All_LastName] Like "" * " & [TempVars]![strSearch] & " * "" )"
'TempVars.Add "strFilter", TempVars!strFilter & " OR ([All_FirstName] Like "" * " & [TempVars]![strSearch] & " * "" )"
'TempVars.Add "strFilter", TempVars!strFilter & " OR ([All_RankTitle] Like "" * " & [TempVars]![strSearch] & " * "" )"
DoCmd.ApplyFilter "", TempVars!strFilter, ""
TempVars.Remove "strFilter"
TempVars.Remove "strSearch"
DoCmd.SetProperty "SearchClear", acPropertyVisible, "-1"
DoCmd.SetProperty "iconSearchClear", acPropertyVisible, "-1"
DoCmd.GoToControl "SearchBox"
DoCmd.SetProperty "SearchGo", acPropertyVisible, "-1"
DoCmd.SetProperty "iconSearchGo", acPropertyVisible, "-1"
SearchGo_GotFocus_Exit:
Exit Sub
SearchGo_GotFocus_Err:
MsgBox Error$
Resume SearchGo_GotFocus_Exit
End Sub