Есть несколько проблем.Вот что возвращает ваша строка (для ясности разбитая на строки):
=IIf(Forms!GARF!GARFsubForm![finished_good_#]<>"",
DLookUp([CustomerSKU],ItemCustomerSKU,"ItemNumber = '"
& Forms!GARF!GARFsubForm![finished_good_#]
& " ' AND Customer = '" & Forms!GARF!customer
& "' AND Company = '" & Forms!GARF!company
& "' AND MarketingSeason = '" & DLookUp([Code],IDtoCode,"ID = "
& Forms!GARF!season_id) & "' AND Season = " & Forms!GARF!GARFyear),"")
Как видите, эти два не указаны в кавычках и должны быть:
DLookUp([CustomerSKU],ItemCustomerSKU,
Здесь есть дополнительный пробел:
& " ' AND Customer = '" & Forms!GARF!customer
Является ли текст finished_good_#
похожим season_id
?
Часто можно использовать одинарную кавычку «вместо», особенно если вы избегаете любого вхождения «в тексте с двумя», например, = O''Reilly '
EDIT
Вы делаете это в коде, поэтому должна быть возможность сделать жизнь проще, например:
A = DLookup("[Code]", "IDtoCode", "ID = " & Forms!GARF!season_id)
B = "DLookUp(""[CustomerSKU]"",""ItemCustomerSKU"",""ItemNumber = '" _
& Forms!GARF!GARFsubForm![finished_good_#] & "' AND Customer = '" _
& Forms!GARF!customer & "' AND Company = '" _
& Forms!GARF!company & "' AND Season = " & Forms!GARF!GARFyear _
& " AND MarketingSeason = '" & A & "'"")"
s = "=IIf(Forms!GARF!GARFsubForm![finished_good_#]<>''," & c & ",'')"
Debug.Print s