Hey thanks alot. This helped a bunch I had to make one small change
for Vantage 5.1 so I thought I would post it for everybody in case
anybody else needed this sometime. Mine looked like this:
/* dateuser.p */
/* To DATE/USER STAMP a VB Form editor control */
/* using a VB Form button control. */
{vbp/vb.i}
DEFINE Variable strEditorContents AS CHARACTER NO-UNDO.
DEFINE variable strUserID AS CHARACTER NO-UNDO.
strUserID = getStringValue("_USERNAME").
strEditorContents = getStringValue("EDITOR_1").
strEditorContents = strEditorContents + STRING(TODAY) + " " +
strUserID + ": ".
setStringValue("EDITOR_1.scrvalue":U,strEditorContents).
RETURN.
/* end of program */
for Vantage 5.1 so I thought I would post it for everybody in case
anybody else needed this sometime. Mine looked like this:
/* dateuser.p */
/* To DATE/USER STAMP a VB Form editor control */
/* using a VB Form button control. */
{vbp/vb.i}
DEFINE Variable strEditorContents AS CHARACTER NO-UNDO.
DEFINE variable strUserID AS CHARACTER NO-UNDO.
strUserID = getStringValue("_USERNAME").
strEditorContents = getStringValue("EDITOR_1").
strEditorContents = strEditorContents + STRING(TODAY) + " " +
strUserID + ": ".
setStringValue("EDITOR_1.scrvalue":U,strEditorContents).
RETURN.
/* end of program */
--- In vantage@y..., "rleury" <beury@h...> wrote:
> On Fri, 22 Feb 2002 18:38:16
> Eric Buss Wrote:
>
> I am looking to make a VB Form that has a editor box and I would
> like to be able to make a button that creates a time / User stamp
> that would add to the bottom of the editor box.
>
> Eric, Try this.....
>
> This was written for Vantage 4.0, you might need to change the
USERID
> ("vantage") to the name of your DB.
>
> For This Example:
> 1. Add the following program to your Vantage\VBP directory
> as dateuser.p
> 2. Create any new VB Form available
> 3. Add an Editor Control from the Palette
> (this should default to "EDITOR_1")
> 4. Add a Push Button Control from the Palette
> (this should default to "BUTTON_1")
> 5. Double click BUTTON-1 and add the command
> "runprog dateuser.p" in the command box and save the VBForm.
> 6. Go to the actual VB Form and press BUTTON-1
>
>
> /* dateuser.p */
> /* To DATE/USER STAMP a VB Form editor control */
> /* using a VB Form button control. */
>
> {vbp/vb.i}
>
> DEFINE Variable strEditorContents AS CHARACTER NO-UNDO.
>
> strEditorContents = getStringValue("EDITOR_1").
>
> strEditorContents = strEditorContents + STRING(TODAY) + " "+
> CAPS(USERID("vantage")) + ": ".
>
> setStringValue("EDITOR_1.scrvalue":U,strEditorContents).
>
> RETURN.
>
> /* end of program */