Alpha Video Training
Results 1 to 2 of 2

Thread: New entry in Status (memo) field.

  1. #1
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    Location
    S.E. Michigan
    Posts
    5,763

    Default New entry in Status (memo) field.

    Here's a short little script I use on a button next to memo fields for starting new entries. The purpose is to take the user to the end of the memo field and enter today's date on a new line with two spaces after it so the user is ready to enter the text.

    The advantages are: (1) it automatically takes the user to the end of the memo regardless of the length, (2) the user doesn't need to know anything else about using a memo field (I want temporary help to be able to use the application with minimal training), (3) by always starting a new line and entering the date automatically, the 'format' always looks the same regardless of who is using it (which means it looks better if printed and it's easier to read).

    Below is the script (also in the attached file) and a short example of the result:

    Code:
    '--- ACTIVATE THE MEMO FIELD
    Parentform:Status.Activate()
    
    '--- GET TEXT STRINGS FOR THE MONTH, DAY, AND YEAR.
    mno = substr( cdate( date()), 5, 2 )
    dno = substr( cdate( date()), 7, 2 )
    yno = substr( cdate( date()), 3, 2 )
    
    '--- CREATE THE 'DATE' TEXT STRING
    '--- NOTE THAT IT ENDS IN A COLON AND 2 SPACES
    date_text = mno + "-" + dno + "-" + yno + ":  "
    
    tc = table.current()
    '--- IF THE MEMO ALREADY HAS SOME TEXT, GO TO THE END 
    '--- AND ADD A NEW LINE.
    IF len(trim( tc.status ))  0
    	sys_send_keys( "{LEFT}" )
    	sys_send_keys( "{^END}" )
    	sys_send_keys( chr(13) )
    END IF
    
    '--- ENTER THE DATE TEXT
    sys_send_keys( date_text )
    
    END
    Sample Result:

    06-23-97: Need to check clearance to steering knuckle for service. Also need to provide sample parts with round head to Rob for him to check on physical parts.
    10-30-97: Rob committed to doing this but he is gone now. Glen has agreed to this idea but wants to review the sketches first.
    11-21-97: We have a good description of the tolerance stack. Chris is working on a drawing which should be ready by next Wednesday at the latest; 11/26/97. We will be busy with warranty until then.
    01-28-98: Met with Glen and he wants add'l SPC data on the diameter.
    05-25-98: Called Joe to find out where this stands and get it moving again. (Joe is new on this program.)

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: New entry in Status (memo) field.

    Elegant, as usual.

    Thanks

Similar Threads

  1. Point to memo entry?
    By Blake in forum Alpha Five Version 5
    Replies: 5
    Last Post: 04-26-2004, 10:47 PM
  2. field entry
    By Mike Vasilinda in forum Alpha Five Version 5
    Replies: 2
    Last Post: 04-01-2004, 04:49 AM
  3. status flags or status variables
    By dik_coleman in forum Alpha Five Version 5
    Replies: 2
    Last Post: 12-13-2003, 08:14 AM
  4. Changing field read status or form restrictions
    By Evan Dembskey in forum Alpha Five Version 5
    Replies: 2
    Last Post: 11-01-2002, 02:00 AM
  5. Automatic date entry into Memo field.
    By Ted Giles in forum Alpha Five Version 4
    Replies: 13
    Last Post: 12-22-2000, 09:18 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •