Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter record Two Criteria

Status
Not open for further replies.

boredguy2000

Programmer
Jun 29, 2007
30
0
0
US
All,
I am a VB bumbler so this is very simple but I really need a little help. I just want to place a filter on a form with two criteria.

I have it done with one:
stLinkCriteria = "[Processor]= '" & Me![AssociateDrop] & "'"

but now need two, something like:
stLinkCriteria = "[Processor]= '" & Me![AssociateDrop] & "'" & "'"[Active]=0"'"

I just can't get the syntax just right. Thank you all for this and all other help!
 
sorry.. please note that I did look (and searched online first) and found a similar question only it didn't have any replies. Just thought that I would mention that I am not trying to be utterly lazy.
 
Well I have this "working":
stLinkCriteria = "[Processor]= '" & Me![AssociateDrop] & "'" & " & [Active]= " & " '" & "0" & "'"

(The [Active] is in refernece to a check box returning 0 for non active files, which is what I want)

However though I have files with that Associate and [Active] with "0" but it is returning no records.

As I mentioned above it works fine with just the associate.

Please help?!
 
How are ya boredguy2000 . . .

. . . and this!
Code:
[blue]stLinkCriteria = "([Processor]= '" & Me![AssociateDrop] & "') AND ([Active]=0)"[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Question: I was reading the post and I has a problem similar. The diffrence is that I am trying to open a form from a subform.


Dim strDocName As String, strLinkCriteria As String

strLinkCriteria = "[IssueCount]= '" & Me![tblIssues_subform]![IssueCount] & "'"

DoCmd.OpenForm stDocName, , , stLinkCriteria

The result did not apply the filter.

Pls help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top