VBasic Help Blank Title 54604

I will give this a try next week. I was able to do what I wanted by
creating a database trigger, but I have not moved that to the live
system yet as it requires a database restart to implement the new
trigger. I would rather make it work like this than using a trigger.

Thanks.
--- In vantage@yahoogroups.com, "Podlin, Michael"
<michael.podlin@...> wrote:
>
> Have you tried removing the "set DATE-FIELD_1.scrvalue = {curdate}"
>
> assuming your "getcurdate.p" is in the mfgsys61\vbp folder, set the
On Entry code to runprog vbp\getcurdate.p
>
> Then for your getcurdate.p code:
>
> {vbp\vb.i}
> find subshiph where rowid(subshiph) = GetCurrentROWID() no-lock.
> if subshiph.date01 = ? or subshiph.date01 = "" then setDateValue
("subshiph.date01.SCRVALUE":U, Today()).
> Return.
>
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]On
Behalf Of markewhittaker
> Sent: Wednesday, February 14, 2007 8:53 AM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: VBasic Help
>
>
>
> Just bumping this back up to the top in case anyone has any ideas.
> --- In vantage@yahoogroups <mailto:vantage%
40yahoogroups.com> .com, "markewhittaker" <markewhittaker@>
> wrote:
> >
> > I have a VBForm that uses the field subshiph.date01. I want the
> form
> > to default the current date if subshiph.date01 is blank. I am not
> > having any luck.
> >
> > In the frame attributes, I have this for On Entry:
> > *******************************************
> > runprog getcurdate.p
> > set DATE-FIELD_1.scrvalue = {curdate}
> > *******************************************
> >
> >
> > The program getcurdate.p contains this:
> >
> > *******************************************
> > {vbp/vb.i}
> >
> > DEFINE VARIABLE curdate as date no-undo.
> >
> > find subshiph where (rowid(subshiph) = GetCurrentROWID()) no-lock.
> >
> > if subshiph.date01 = ? then assign curdate = today.
> > else assign curdate = subshiph.date01.
> >
> > return.
> > *******************************************
> >
> > This is with Vantage version 6.1. I have tried many different
> > variations on this based on what I have seen in sample programs
and
> a
> > few questions here. No luck. Can anyone help?
> >
> > Mark
> >
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
I have a VBForm that uses the field subshiph.date01. I want the form
to default the current date if subshiph.date01 is blank. I am not
having any luck.

In the frame attributes, I have this for On Entry:
*******************************************
runprog getcurdate.p
set DATE-FIELD_1.scrvalue = {curdate}
*******************************************


The program getcurdate.p contains this:

*******************************************
{vbp/vb.i}

DEFINE VARIABLE curdate as date no-undo.

find subshiph where (rowid(subshiph) = GetCurrentROWID()) no-lock.

if subshiph.date01 = ? then assign curdate = today.
else assign curdate = subshiph.date01.

return.
*******************************************

This is with Vantage version 6.1. I have tried many different
variations on this based on what I have seen in sample programs and a
few questions here. No luck. Can anyone help?

Mark
Just bumping this back up to the top in case anyone has any ideas.
--- In vantage@yahoogroups.com, "markewhittaker" <markewhittaker@...>
wrote:
>
> I have a VBForm that uses the field subshiph.date01. I want the
form
> to default the current date if subshiph.date01 is blank. I am not
> having any luck.
>
> In the frame attributes, I have this for On Entry:
> *******************************************
> runprog getcurdate.p
> set DATE-FIELD_1.scrvalue = {curdate}
> *******************************************
>
>
> The program getcurdate.p contains this:
>
> *******************************************
> {vbp/vb.i}
>
> DEFINE VARIABLE curdate as date no-undo.
>
> find subshiph where (rowid(subshiph) = GetCurrentROWID()) no-lock.
>
> if subshiph.date01 = ? then assign curdate = today.
> else assign curdate = subshiph.date01.
>
> return.
> *******************************************
>
> This is with Vantage version 6.1. I have tried many different
> variations on this based on what I have seen in sample programs and
a
> few questions here. No luck. Can anyone help?
>
> Mark
>
Have you tried removing the "set DATE-FIELD_1.scrvalue = {curdate}"

assuming your "getcurdate.p" is in the mfgsys61\vbp folder, set the On Entry code to runprog vbp\getcurdate.p

Then for your getcurdate.p code:

{vbp\vb.i}
find subshiph where rowid(subshiph) = GetCurrentROWID() no-lock.
if subshiph.date01 = ? or subshiph.date01 = "" then setDateValue("subshiph.date01.SCRVALUE":U, Today()).
Return.


-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]On Behalf Of markewhittaker
Sent: Wednesday, February 14, 2007 8:53 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: VBasic Help



Just bumping this back up to the top in case anyone has any ideas.
--- In vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com, "markewhittaker" <markewhittaker@...>
wrote:
>
> I have a VBForm that uses the field subshiph.date01. I want the
form
> to default the current date if subshiph.date01 is blank. I am not
> having any luck.
>
> In the frame attributes, I have this for On Entry:
> *******************************************
> runprog getcurdate.p
> set DATE-FIELD_1.scrvalue = {curdate}
> *******************************************
>
>
> The program getcurdate.p contains this:
>
> *******************************************
> {vbp/vb.i}
>
> DEFINE VARIABLE curdate as date no-undo.
>
> find subshiph where (rowid(subshiph) = GetCurrentROWID()) no-lock.
>
> if subshiph.date01 = ? then assign curdate = today.
> else assign curdate = subshiph.date01.
>
> return.
> *******************************************
>
> This is with Vantage version 6.1. I have tried many different
> variations on this based on what I have seen in sample programs and
a
> few questions here. No luck. Can anyone help?
>
> Mark
>







[Non-text portions of this message have been removed]