Wicklund
Registered User.
- Local time
- Today, 22:25
- Joined
- Jun 7, 2002
- Messages
- 56
I have run into a wall, as far as the number of 'options' I can have in a critera option.
I am in a loop, pulling information out of a table, and I want to insure that I do not pull information for the same record twice, so I am adding the Key Field to the Criteria after each pass (see code below).
Dim stLinkCriteria As String
tempIG = DLookup("[IG Number]", "[Project Status - Tbl]", stLinkCriteria)
tempNew = DLookup("[New Parts]", "[Project Status - Tbl]", stLinkCriteria)
stLinkCriteria = stLinkCriteria & " and [IG Number] <> '" & tempIG & "'"
The problem is that there are so many records, that I am hitting the max allowable options for the search. I am getting the following error:
"Query is too complex"
Any ideas??

I am in a loop, pulling information out of a table, and I want to insure that I do not pull information for the same record twice, so I am adding the Key Field to the Criteria after each pass (see code below).
Dim stLinkCriteria As String
tempIG = DLookup("[IG Number]", "[Project Status - Tbl]", stLinkCriteria)
tempNew = DLookup("[New Parts]", "[Project Status - Tbl]", stLinkCriteria)
stLinkCriteria = stLinkCriteria & " and [IG Number] <> '" & tempIG & "'"
The problem is that there are so many records, that I am hitting the max allowable options for the search. I am getting the following error:
"Query is too complex"
Any ideas??