This content has been marked as final. Show 5 replies
Find out the syntax for selecting substrings in access (I don't know it myself).
I found this help from the CF documentation. This might help you with your question. It demonstrates the LEFT function. You can rewrite your code to do just that for now.
<!--- If len returns 0 (zero), then show error message. --->
<cfif Len(Form.myText) LTE Form.RemoveChars>
<cfoutput><p style="color: red; font-weight: bold">Your string #Form.myText# only has #Len(Form.myText)# characters. You cannot output
the #Form.removeChars# leftmost characters of this string because it is
not long enough.</p></cfoutput>
<cfoutput><p>Your original string: <strong>#Form.myText#</strong></p>
<p>Your changed string, showing only the <strong>#Form.removeChars#
</strong> leftmost characters:
<p style="color: red; font-weight: bold">Please enter a string of more than 0 (zero) characters.</p>
<form action="<cfoutput>#CGI.ScriptName#</cfoutput>" method="POST">
<p>Type in some text<br />
<input type="Text" name="myText"></p>
<p>How many characters from the left do you want to show?
<option value="3" selected>3
<input type="Submit" name="Submit" value="Remove characters"></p>
Hope it helps..
Thanks for the help, i'm going to try them out...if anyone knows of any other way of doing this please let me know so i can choose which is the best way for me to implement this feature. Thanks again....
Primalx2003, I think that will work perfectly, i will give it a try and let you know...thanks!
it works out great, thanks a lot for all your help guys...appreciate it!