This topic is locked
[SOLVED]

 Auto Fill A Field In A Record

3/12/2013 12:44:40 PM
ASPRunnerPro General questions
K
kleanthis author

I have a table with three fields (Hardware, Model, Hard_Model).

In the Add page I want to add the Hardwareand the Modeland automatically to fill the Hard_Modelfield with the values of the other two fields. I don't want to see the Hard_Model field so I chest I could use the After record added event.
Example.

Hardware......Model..........Hard_Model

PC..................Compact......PC-Compact

Monitor...........HP................Monitor-HP
Thanks

Kleanthis

U
Ugain 3/13/2013



I have a table with three fields (Hardware, Model, Hard_Model).

In the Add page I want to add the Hardwareand the Modeland automatically to fill the Hard_Modelfield with the values of the other two fields. I don't want to see the Hard_Model field so I chest I could use the After record added event.
Example.

Hardware......Model..........Hard_Model

PC..................Compact......PC-Compact

Monitor...........HP................Monitor-HP
Thanks

Kleanthis


Go to the User Guide and find how to concatenate the values of the first two fields as an input into the 3rd field.

K
kleanthis author 3/13/2013

Can you be more precise pls.

U
Ugain 3/13/2013



Can you be more precise pls.


You will need to code it, it is not point and click. Search web for "concatenate fields in ASP" and learn.

General format: val(fld3) = val(fld1) + val(fld2).

The actual syntax depends on the scripting lang you use and/or the database in use if you want to do it in SQL.

K
kleanthis author 3/14/2013

In the Before the record addEvent of the Add Page
values("Hardware_Make") = values("Hardware")+ "-"+values("Make")