CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 How do I get the value of any control in any form in a variable in an Event Handler

Print topic Send  topic

Author Message
Salek
Posted: 04/20/2003, 11:50 AM

Hello

I wonder if some one can point me to the right direction.
I am using asp3+templates + msaccess in CCS.
I need to add a record in USERS table after I insert a record in
Distributors Table,
so the Newly inserted Distribuor has a user for him automatically generated.
Heres how I had the it working right in CC, That I cant seem to port in
CCS.
----------------------------------------------------------------------------
---------------------
select case sAction
case "insert"
'-------------------------------
' distributors1 AfterInsert Event begin
InsertUser fldDistributorName,fldEmail,utDistributor // this function in
GLOBAL CODE does the Job
' distributors1 AfterInsert Event end
'-------------------------------
case "delete"
'-------------------------------
' distributors1 AfterDelete Event begin
DeleteUser sWhere // this clears
the users if the Distributor is deleted
' distributors1 AfterDelete Event end
'-------------------------------
end select

Hope you get the situation........
Now my quesion is

1. How do i include My Code in CSS?
CC had a simple way {global code} but i cant find it in CSS.


2. How do I get the value of any control in any form in a variable?
in CC I saw the code and figuered out fldFieldName did it
so I could write InsertUser fldDistributorName,fldEmail


Thanks in Advance
Regards
Salek



Robert Rodgers
Posted: 04/21/2003, 6:58 AM

Hi,

In ASP.

1) To include my own global code or funtions in ccs I create my own .asp
page and then include it in the common file "common.asp" Make sure it gets
uploaded to the server.

2)
To get the value of a field on a form use this format.
FormName.FieldName.Value

In my case this this assigns the zip code to a local variable.
lZip = wsbdcRequest.Zip.Value


If you are getting the value of a column that is in the recordset but not
displayed on the form then you can access the RecordSet like this.

FormName.RecordSet.Fields("ColumnName")

Below is how I concatinated the last and first names for display, and
assigned it to the display variable.
wsbdcRequest.LastFirstName.Value =
wsbdcRequest.Recordset.Fields("LastName") & ", " &
wsbdcRequest.Recordset.Fields("FirstName")


In both examples above "wsbdcRequest" is the name of my form on this page.

rob


--
"The average person thinks he isn't."
Larry Lorenzoni
++++++++++++++++++++++++++++++

"Salek" <salek@neksus.com> wrote in message
news:b7uq5v$gcb$1@news.codecharge.com...
> Hello
>
> I wonder if some one can point me to the right direction.
> I am using asp3+templates + msaccess in CCS.
> I need to add a record in USERS table after I insert a record in
> Distributors Table,
> so the Newly inserted Distribuor has a user for him automatically
generated.
> Heres how I had the it working right in CC, That I cant seem to port in
> CCS.
> --------------------------------------------------------------------------
--
> ---------------------
> select case sAction
> case "insert"
> '-------------------------------
> ' distributors1 AfterInsert Event begin
> InsertUser fldDistributorName,fldEmail,utDistributor // this function
in
> GLOBAL CODE does the Job
> ' distributors1 AfterInsert Event end
> '-------------------------------
> case "delete"
> '-------------------------------
> ' distributors1 AfterDelete Event begin
> DeleteUser sWhere // this
clears
> the users if the Distributor is deleted
> ' distributors1 AfterDelete Event end
> '-------------------------------
> end select
>
> Hope you get the situation........
> Now my quesion is
>
> 1. How do i include My Code in CSS?
> CC had a simple way {global code} but i cant find it in CSS.
>
>
> 2. How do I get the value of any control in any form in a variable?
> in CC I saw the code and figuered out fldFieldName did it
> so I could write InsertUser fldDistributorName,fldEmail
>
>
> Thanks in Advance
> Regards
> Salek
>
>
>
>


   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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