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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shouldn't this work? 1

Status
Not open for further replies.

Golding

Vendor
Aug 4, 2000
9
US
Is there another way to write this so it works?

SQL = ("SELECT * FROM members WHERE act = 'active' AND pr_agent2 OR pr_agent =" & agn)

Basically the agn is a request defined earlier, that part is working. It seems to be the 'pr_agent2 OR pr_agent' part thats not doing what it should.

Any ideas?

Thanx
 
give this a try:

SQL = ("SELECT * FROM members WHERE act = 'active' AND (pr_agent2 =" & agn & " OR pr_agent =" & agn))


Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Although that didn't work, it pointed me in the right direction, this is what eventually worked..
SQL = ("SELECT * FROM members WHERE act = 'active' AND pr_agent2 =" & agn & " OR act = 'active' AND pr_agent =" & agn)

Thanks very much :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top