E
Eric Frohmann
I'm stumped here......again <sigh>
Here is the run-time result of my filter setting:
debug.Print adoRsStand.Filter
[sfmm-id]="17665503018390" and ([CruiseYear]="1996") and ([pkFlag]=true)
Fields [sfmm-id] and [CruiseYear] are both Text
Field [pkFlag] is Yes/No
The problem seems to the the double quotes are being automagically inserted.
Here's the code creating this:
stCruiseYearcriteria = " and ([CruiseYear]=" &
adoRs.Fields("CruiseYear").Value & ")"
adoRsStand.Filter = "[sfmm-id]=" & adoRs.Fields("sfmm-id").Value &
stCruiseYearcriteria & " and ([pkFlag]=true)"
I've tried several variations on the theme, the filter criteria always comes
up with zilch although when I apply the filter interactively I get the
correct results...
Here's my test:
bNoRecs = Eval(adoRsStand.EOF = True)
FTR, here's my original statments which didn't work either:
' stCruiseYearcriteria = " and (CruiseYear='" &
adoRs.Fields("CruiseYear") & "')"
' adoRsStand.Filter = "[sfmm-id]='" & adoRs.Fields("sfmm-id") &
"'" & stCruiseYearcriteria
The rn-time result is:
debug.Print adoRsStand.Filter
[sfmm-id]='"17665503018390"' and ([CruiseYear]='"1996"') and ([pkFlag]=true)
WhaddaIgottaDo????
TIA
Here is the run-time result of my filter setting:
debug.Print adoRsStand.Filter
[sfmm-id]="17665503018390" and ([CruiseYear]="1996") and ([pkFlag]=true)
Fields [sfmm-id] and [CruiseYear] are both Text
Field [pkFlag] is Yes/No
The problem seems to the the double quotes are being automagically inserted.
Here's the code creating this:
stCruiseYearcriteria = " and ([CruiseYear]=" &
adoRs.Fields("CruiseYear").Value & ")"
adoRsStand.Filter = "[sfmm-id]=" & adoRs.Fields("sfmm-id").Value &
stCruiseYearcriteria & " and ([pkFlag]=true)"
I've tried several variations on the theme, the filter criteria always comes
up with zilch although when I apply the filter interactively I get the
correct results...
Here's my test:
bNoRecs = Eval(adoRsStand.EOF = True)
FTR, here's my original statments which didn't work either:
' stCruiseYearcriteria = " and (CruiseYear='" &
adoRs.Fields("CruiseYear") & "')"
' adoRsStand.Filter = "[sfmm-id]='" & adoRs.Fields("sfmm-id") &
"'" & stCruiseYearcriteria
The rn-time result is:
debug.Print adoRsStand.Filter
[sfmm-id]='"17665503018390"' and ([CruiseYear]='"1996"') and ([pkFlag]=true)
WhaddaIgottaDo????
TIA