home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 October A / Pcwk10a98.iso / Lotus / LOTUS / SMASTERS / APPROACH / SCHEDULE.MPR / SCRIPT / ApproachDoc / Schedule Display / Body / fbxDateDisplay.s (.txt) < prev    next >
Encoding:
Null Bytes Alternating  |  1997-01-09  |  2.9 KB  |  40 lines

  1. '++LotusScript Development Environment:2:5:(Options):0:66
  2.  
  3. '++LotusScript Development Environment:2:5:(Forward):0:1
  4. Declare Sub Change(Source As Fieldbox)
  5.  
  6. '++LotusScript Development Environment:2:5:(Declarations):0:2
  7.  
  8. '++LotusScript Development Environment:2:2:BindEvents:1:129
  9. Private Sub BindEvents(Byval Objectname_ As String)
  10.     Static Source As FIELDBOX
  11.     Set Source = Bind(Objectname_)
  12.     On Event Change From Source Call Change
  13. End Sub
  14.  
  15. '++LotusScript Development Environment:2:2:Change:1:12
  16. Sub Change(Source As Fieldbox)
  17. ' Change event for fbxDateDisplay field box object on Schedule Display view
  18. ' If the user enters a new date in the date display box at the top of the view,
  19. ' this script identifies the new text as a date, clears the view of other reservation
  20. ' information, and fills the view with reservation information for the new date.
  21.     
  22.     ' Check to see if the new text is a date, then
  23.     If Isdate(source.text) Then
  24.         
  25.         ' Run the clearDisplay sub to remove previous reservation info from
  26.         ' the view
  27.         Call clearDisplay()
  28.         
  29.         ' Search for reservation information for the new date and display it
  30.         ' in the view
  31.         Call readBlock (source.fbxDateDisplay.text)
  32.         
  33.     Else    ' If the new text is not a date, then
  34.         
  35.         ' Prompt the user that the text is not in a form that can be understood
  36.         Messagebox "Date entered is not valid. Enter a date in the format MM/DD/YY", MB_OK + MB_ICONEXCLAMATION, "Invalid date"
  37.         
  38.     End If        ' Is the text a date
  39.     
  40. End Sub    ' Change event on fbxDateDisplay