mitch
Posts: 2
|
Posted: 03/03/2005, 12:23 PM |
|
How i can get parameter from form_1 to form_2 in this case
for example,
recordform name form_1 event new record, tbl_emon
field_1 = user_id ( type number) default value auto, hidden
field_2 = date ( type date ) default value [ value "date" form_2 ] field_n = count ( type number) custom
form name form_2 hidden sql select from tbl_emon, user_id, max(date) group by user_id
field_1 = user_id ( type number) hidden
field_2 = date ( type date ) max value
Your help would be greatly appreciated.
Thanks
mitch
|
|
|
Nicole
Posts: 586
|
Posted: 03/04/2005, 12:55 AM |
|
Mitch,
I’m afraid that it is impossible to obtain a value from one form on another form in CodeCharge.
Please use Before Show event of form_2 to call DLooUp() function and retrieve max(date) value from tbl_emon
Regards,
Helen
_________________
Regards,
Nicole |
|
|
mitch
Posts: 2
|
Posted: 03/07/2005, 4:43 AM |
|
tanks to Nicole for quick responce.
i have a solution by funktion DLookup. Works pretty
Here are the basics:
$u_id = get_session("UserID"); // User login
if($u_id > 0) { // check if it exist
// get parameter date max
$last_date_from_user = Dlookup("tbl_emoni", "max(date2)", "user_id=" . $u_id );
if($flddate_02 == "") // New Record Default Value
// Das Datum dem Field DeinDateField vorgeben.
$flddate_02 = $last_date_from_user;
}
nicole, how is cc compare value count_01 to count_02
it is important that user can only insert a
value in count_02 > count_01. By false give user
a message what is wrong.
New Record in Form_01 by use Default Value
-------------------------------------------
def-Val. | def-val. | user | user |
date_01 | Count_01 | date_02 | Count_02 |
-------------------------------------------
20.02.05 | 199 | 22.02.05 | 205 | Ok
22.02.05 | 205 | 24.02.05 | 215 | OK
24.02.05 | 215 | 26.02.05 | 195 | false
hop to hear again
regards,
mitch
|
|
|
|
|
|
|
|