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

OR

Status
Not open for further replies.

patweb

Programmer
Apr 17, 2003
174
BE
Code:
StrWhere = StrWhere + "((([T-LOOKUP-PAG].[" & CodeValue1 & "]) = YES)) or"

StrWhere is a string that will be used for an SQL. The string will contain one or more Where Conditions. However the last OR is to much.

I should count the lenght of the string and then probably use the left function to get a StrWhere without the last or.
How to do this or a better id ?

pat
 
Inside your loop:
StrWhere = StrWhere & " OR ([T-LOOKUP-PAG].[" & CodeValue1 & "] = YES)"
When all is done:
StrWhere = Mid(StrWhere, 4) ' get rid of 1rst OR

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top