Alisun Posted September 27, 2006 Posted September 27, 2006 Hello, In my database (probably like many!), I have a year field for each record. The field has a value list, that looks like this: 1998 1999 2000 2001 2002 (etc. to 2006) If I want to find a range of dates, for example all records from 1998-2002, how do I do this if I have a value list? In FIND mode, it looks like I can only choose one year at a time. Please could someone tell me how to find a range of dates? --Alisun
Raybaudi Posted September 27, 2006 Posted September 27, 2006 Hi either directly in FIND mode with something like: 1998..2002 inside that field or, better, with a script.
Alisun Posted September 27, 2006 Author Posted September 27, 2006 The problem is that since there is a value list, I cannot type in the field. In order to do this type of find, do I need to temporarily remove the value list? --Alison
Alisun Posted September 27, 2006 Author Posted September 27, 2006 Daniele, Thanks for your reply. I figured out any easy solution: I added "Other" to the value list, to allow entries of other values. Now I can type in the field in FIND mode. I did a search of 1998..2002 and it worked! Horray! --Alison
aldipalo Posted September 27, 2006 Posted September 27, 2006 Create 2 new global fields gYR1 gYR2 In a script: enter find mode() Show Custom Dialog set field(:datefield;:gYR1 & "..." & gYR2 Perform Find() See Attached file for working example. HTH Sales_Rep.zip
BobWeaver Posted September 27, 2006 Posted September 27, 2006 Another way is to set the field behavior to allow entry only in browse mode. Then create a duplicate of the field, but without the value list, and place it directly behind the existing field. Set its behavior to allow entry only in find mode. The result is, when in browse mode, you get a value list, and when in find mode, you get a standard text edit field which allows you to enter more complicated finds.
aldipalo Posted September 27, 2006 Posted September 27, 2006 If all you are looking to do is put the range in the valuelist field you just have to click the field a second time and the valuelist goes away and you can enter your criteria. I thought she was looking for a script to do it. :D
Recommended Posts
This topic is 6701 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now