shadow9449
Registered User.
- Local time
- Today, 02:13
- Joined
- Mar 5, 2004
- Messages
- 1,037
An alternative construct.
Code:DIM IntCase as Integer IntCase = 0 if like "apples*" then IntCase =1 if like "oranges*" then IntCase =2 if like "something weird" then IntCase =999 Select Case IntCase Case 0 No match Error message Case 1 Code for this situation Case 2 Code of this situation Case Else A second opportunity for an error message End Select
Yes, that's the kind of thing I would have done had I used the If approach. The SWITCH approach in a query worked really well. As I said earlier, I tested it with hundreds of thousands of records of live data and it returned the query results instantly.
Of course Access 2007 might give a different result but Access 2007 users are used to everything being slow
SHADOW