Local Printing with GoToMyPc and a 2nd question on Inputting Dates

George Simon GSimon at americanriverintl.com
Tue Aug 24 13:37:13 PDT 2010


> Another solution might be 2 dummy fields one 5 character and the other 4.  You could create and edit to automatically fill in a leading zero on put in > a slash in the third position.

> Then combine the 2 fields into a date field.  It the values are wrong, you'll get an error message.   Or, mid(ff,1,2) and test if the value is greater > than 12 or less than 1.  The next test would be the day value and the range of values would depend on the month as well as the year entered.  Need to > see if this is a leap year and 02/29/yr is a viable date.

> Seems easier to let filePro carry the load in testing for a viable date.

Are you serious? :-)

If you wanted to show the entire date on a real date field all you would have to do is:

@wef1  ◄ If: 1 ne ""
         Then: end
   ---
         ◄ If:
         Then: show("4","7") @t4
    
         ◄ If:
         Then: end

And, if you wanted to place the user on the day portion all you have to add to the code is: pushkey "[crgt][crgt][crgt]"


> Another thought which would take a bit more programming,  2 arrays and a year field.

> Dim month(12);dim days(31);yr(4,.0)

> Get the year first unless the date to enter is always in the current year.  Now this may present a problem in December >as one nears the new year and 
> the date could fall in January.

> Yr can be set to default to the current year if mothering is entered.

> Pre fill the month array with the numeric month value.  If the day array based on if the year is a leap year and the number of days in the month.  If > the month is 02, then test  for a leap year.

> Once the month and day have been selected, concatenate the year.

> Another solution is to purchase Laura Brody's calendar program and pop up a calendar when entering the date field.  Select the date, no fuss.  You can > put up between 1 and 3 months at a time.

You are out of control, Richard. :-)






More information about the Filepro-list mailing list