Todd
|
Posted: 10/22/2003, 9:50 PM |
|
Note: Using ASP
I've been using CC and have just upgraded to CCS. I have two field FirstName and LastName. I want to BeforeInsert (and BeforeUpdate) combine those two fields to create a hidden field call FullName. In CC I used something like this:
fldFullName=fldLastName & ", " & fldFirstName
How do I accomplish the same thing in CCS. The code above doesn't seem to work.
Any help would be great!
|
|
|
ryan
|
Posted: 10/22/2003, 10:19 PM |
|
1st it's a good thing you upgraded to CCS the world is different b/w CC and CCS next you can combine two fields by
- creating a new label or textbox (no control source)
- next is you assign the values of the two control sources to your new label/textbox
-assign that on the before show event of your label/textbox
'write ur code here
dim combined_
combined_ = urfrmname.urfldname1.value & " " & urfrmname.urfldname2.value
yourformname.yourlabelname.value = combined_
|
|
|
Todd
|
Posted: 10/23/2003, 11:08 AM |
|
Ryan,
Thanks for the quick response! I appreciate the help.
|
|
|
Todd
|
Posted: 10/26/2003, 8:07 PM |
|
Ok...I've finally had an opportunity to try the code Ryan suggested and I can't seem to get it to work. Just to clarify...when I insert a record into the database, when the record gets sent to the database (I'm assuming Before Insert), I want the first name ("FirstName") and last name ("LastName") to be combined into one long name ("FullName") and inserted in the database. The user will only insert the first name and last name, and then my code on the backend would put the two fields together and insert that info into the FullName field in the database. I've tried the code Ryan suggested, in fact I've even tried something like this (Patrollers is the form):
Patrollers.FullName.Value = Patrollers.LastName.Value
That won't even work. I've even tried inserting a value (like "15") and that doesn't work. The record gets entered into the database, but for some reason I can't get anything to be inserted for the "FullName" field in the database. Any suggestions? Thanks for the help.
|
|
|
ryan
|
Posted: 10/26/2003, 9:31 PM |
|
It is possible Todd kindly visit
http://www13.brinkster.com/charmangel/TestProject/combi...usr_GridRec.asp
post your email I'll send you the CCS+APS 3.0 w/ template project :)
|
|
|
Todd
|
Posted: 10/26/2003, 9:37 PM |
|
Ryan,
That is exactly what I'm trying to do.
tcoston@kccd.cc.ca.us
Thanks!
|
|
|
Todd
|
Posted: 10/26/2003, 10:02 PM |
|
Ryan,
I got it figured out. I wasn't setting the Control Source on my hidden field "FullName" to a database column. I had left that blank. Thanks for all your help, I really appreciate it.
Thanks!
|
|
|