not sure if this is what you need but...
year(BatchDate) * 10^2 + month(Batchdate) will return a number of this
form - 200801 or 200811. You could do range searches like
"200801...200806".
mind you when i reread your post this may not be what you need but it
may give you an idea.
what about some trickery involving 12 buttons - one per month - each
running same script but with a passed parameter - the month#.
you can then add some logic in the script to determine that if they
click APRIL they must mean last April since this April hasn't occurred
yet, so you'd search for 200704 but a click on FEB would search for
200802...
if that's what you mean I could code an example - this is in the "off
the top of my head" mode...
Stephen
--------
"The year was 2081, and everyone was finally equal." -- Kurt Vonnegut
On Mar 29, 2008, at 5:32 PM, Kevin Doyle wrote:
I haven't found a way to do this and was wondering if it can be done.
I'd like to create a Find button on a layout, that on clicking would
generate either a pup-up or dropdown menu with a value list that
could be
selected that would then find the records with that value in a
specified
field.
As an example, I have a membership database for an organization where
renewals are recorded in batches by months. Each month is recorded
in a
Value List. The Current batch field is filled in by selecting
clicking in
the field and then selecting the month from the value list that pops
up. I
currently solve the problem by creating separate Find scripts for
each month
and programming individual month buttons (Jan08, Feb08, Mar08, etc.)
but the
number of buttons grows gros and grows. I'm trying to figure out if
I can
create a script for a "Find batch" button that would result in the
months
value list popping up, then returning the records that have that
month in
the "Current batch" field.
If it can't be done, that would be useful information as well.
FMPro 8.5 if that makes a difference.
Thanks.
Kevin