Local Printing with GoToMyPc and a 2nd question on Inputing Dates
John Esak
john at valar.com
Tue Aug 24 11:35:24 PDT 2010
> Also, I have a field mdyy/ in a standing file. During input
> I'd like to enter just the mmdd and have fp fill in the
> current year. Currently I use an INPUT command over the
> actual field, and have processing determine the current year
> and add the yyyy to the input variable, then make the real
> field equal to the variable. Is there a simpler way to do this?
>
>
> Any help would be greatly appreciated.
>
> Thanks
> Bob Simcoe
Ken got your printer question.... And I was going to answer this one... But
when I started... I counted them up and there were 2,995,676 ways to do
this... So I decided not to throw in my two cents. You have the basic nut
in that yes, you have to use a dummy first, and add the current year to it
to build the full mdyy/ data type. I would probably do this the very hard
way if it is really important to get it right and have the smaller data
entry of just month and day. I would put a 10 character * type field in the
cursor path. Say, AA, Let them enter any 5 character like 05/02... Then,
when they leave the field do zillions of lines of processing to first test
the month to see if it is valid, then the day using MID. Then I would MID
the last 4 characters of @T4 onto AA and make the new AA appear on the
screen in place of the shorter given version with a DISPLAY. As part of the
zillions of lines of code, I would have to be sure that each time the cursor
passed through the field... UP or DOWN or SIDEWAYS gone... That whatever was
left in the field was a valid date. Do this by using @sk to keep the cursor
moving in the right direcdtion... And comparing AA to another variable of
10,mdyy/ type with doedit().
How much did you want them to be able to enter just part of the date? :-)
John Esak
More information about the Filepro-list
mailing list