You are missing an apostrophe, your syntax requires apostrophes around the string values. If I am correct it should read -
Dim A, B As String
'Enclose the string from datagrid in apostrophe's - exploded view - " ' "...
A = "'" & AdvancedDataGridView1.FilterString & "'"
B = A & " Or ItemName = 'total'"
BindingSource1.Filter = B