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:
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.)
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
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.)
Comment