Rocky Smolin - Beach Access Software
bchacc at san.rr.com
Wed Jun 1 22:16:35 CDT 2005
Martin: I think case 7 would be IsNull. You can try it. Case 8 would be Me.Filter="": Me.FilterOn=False. I think. Rocky ----- Original Message ----- From: "Martin Caro" <mcaro at bigpond.net.au> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Sent: Wednesday, June 01, 2005 7:17 PM Subject: [AccessD] Changing Criteria Hi Folks Is it possible to do the following: I have a query where one of the fields references a text box containing a Filter Code to pick up the required selection criteria for the query. It works fine for Case 1 to 6 but what is the syntax to make Case 7 and 8 work? Private Sub HotelFilter_AfterUpdate() Select Case HotelFilter Case Is = 1 FilterCode = "FH" Case Is = 2 FilterCode = "FHI" Case Is = 3 FilterCode = "LH" Case Is = 4 FilterCode = "B" Case Is = 5 FilterCode = "L" Case Is = 6 FilterCode = "E" Case Is = 7 FilterCode = Display only those records that do not have a code ie Code is Null Case Is = 8 FilterCode = Display all records ie no filter End Select Me.Refresh -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com