|
Hi R:Base
buddies Looking for some
idea. Here’s the
situation: I have several screens
which prompt users for search criteria for reports, editing screens, etc.
Several of these refer to a date field used in an invoices table: in this
company, invoice dates are almost ALWAYS the 15th or 16th
of the month. My users have
requested that these dates default to the 15th or 16th
when the form comes up, instead of the current date as it does
now. Here’s the problem: I’m using variable Date pickers for
these fields. The user is
most cases is NOT required to include the date in the search criteria. Now it works fine – even though a date
shows in the picker, unless they click on it to change it, the variable actually
is NULL when the user exits the form. ONLY if they click on it and change the
date manually or by the calendar is the variable set to a date. So the calling
program can check for the variable NULL or NOT NULL and build the where clause
accordingly. In fact, I actually
have a message box on the form warning them that even the date showing is the
one they want, they must click on the picker to actually select it. (If you don’t, the variable remains
NULL) I know I can default the
date picker to the 15th of the current month by actually SETTING the
variable for the picker to that date prior to going into the form, but then how
can I tell if the user actually WANTS that date used in the search? It could be unchanged because they never
clicked on the picker, and it could be unchanged because they clicked on it and
WANT that date. There’s no way to tell that I know of. The only idea I’ve had
is a little kludgy: add a radio button: “Use date(s) in search criteria yes
/ no” with no default set. The form would have an error trap to
force the user to indicate with a yes/no click if they want the date. This way I can have a default and know
if the user wants that date or is just ignoring it. Is there a better
way? In my current release of
R:DOCS, I don’t see a PROPERTY command that would set a default value for the
picker, but leave the variable NULL until the user actually clicks on it to
select it. Since I know there a
quite a few new options that aren’t yet in R:DOCS, is there one that will do
what I want? Or can anyone think of
another way? |
