CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 Where to put a custom Function (Newbee)

Print topic Send  topic

Author Message
Robert Sorrells
Posted: 07/05/2003, 8:51 AM

I've got some code that I have under "Before Update" in my maintenance form.
I also need to put the idential code under "Before Insert". Instead of
just copying and pasting, I thought I'd try to create a custom function.

In the help file, under "Replace Control Value Before Inserting", they talk
about doing this by "1. Add the custom LastUpdateInfo() function."

How and where do to you insert the custom function code?

Thanks,
Bob

DonB
Posted: 07/05/2003, 3:17 PM

It's perfectly acceptable to put your own routines outside of the blocks
that CCS controls. They won't be deleted or altered in anyway. I
recommend, though, that you put all your stuff into separate "include" files
and then you can included it in the "Events" page.

Then you can call your common routines from each event there you need it.

DonB


"Robert Sorrells" <rsorrellsU@KNOWmindspring.com> wrote in message
news:be6s6i$1n1$1@news.codecharge.com...
> I've got some code that I have under "Before Update" in my maintenance
form.
> I also need to put the idential code under "Before Insert". Instead of
> just copying and pasting, I thought I'd try to create a custom function.
>
> In the help file, under "Replace Control Value Before Inserting", they
talk
> about doing this by "1. Add the custom LastUpdateInfo() function."
>
> How and where do to you insert the custom function code?
>
> Thanks,
> Bob
>
>

Sjg
Posted: 07/12/2003, 3:40 AM

Put the code in the Validate Event if you can. I believe there is some
documentation on the order of the events and what triggers the events.

The Validate event is fired for an Insert and an Update. It is not fired
for a Delete.

If you need to know which button was submitted use the PressedButton
property of the Form

Put this code in to see the values of pressed button on a form. Where xxxxx
is the name of the Form not page. What this will do is return the pressed
button as the error message. The values will be "Button_Insert" or
"Button_Update"


With xxxxx
.Errors.addError(.PressedButton)
End With


Sjg


"Robert Sorrells" <rsorrellsU@KNOWmindspring.com> wrote in message
news:be6s6i$1n1$1@news.codecharge.com...
> I've got some code that I have under "Before Update" in my maintenance
form.
> I also need to put the idential code under "Before Insert". Instead of
> just copying and pasting, I thought I'd try to create a custom function.
>
> In the help file, under "Replace Control Value Before Inserting", they
talk
> about doing this by "1. Add the custom LastUpdateInfo() function."
>
> How and where do to you insert the custom function code?
>
> Thanks,
> Bob
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.