Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving 3 Characters to a Different Field.

Status
Not open for further replies.

famousb

Programmer
Mar 2, 2000
239
0
0
US
I know i've seen this done, i have a 15 digit number in field &quot;Claim&quot;, i need the last 3 digits to be moved to a field name &quot;LineItem&quot;<br>what is the easiest way to go about this?&nbsp;&nbsp;cutting and pasting uses too much glue...<br><br>thanks again <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
make an updatequery where you update your field LineItem to Right([Claim], 3)<br><br>Hope this helps,<br><br><br>Greetings,<br><br>Dirk<br><br><A HREF="mailto:dirk.news@yucom.be">dirk.news@yucom.be</A><br>
 
<br><b>Be careful here, nothing I've touched in the past two days has worked very well</b>. Smile.<br><br>There is an 'Exit' event for a text box that can be used to update other text boxes on your form, as in...<br><br>Private Sub TextBox1_Exit(Cancel as Integer)<br>&nbsp;&nbsp;[TextBox2] = left([TextBox1],3) & &quot;-&quot; & [TextBox1]<br>&nbsp;&nbsp;Textbox3.SetFocus 'skip over to the next input box.<br><br>&nbsp;&nbsp;'Stuffs the first three characters&nbsp;&nbsp;<br>&nbsp;&nbsp;'contained in [textbox1] into [textbox2] separates<br>&nbsp;&nbsp;'it with a dash and appenends contents of [textbox1]<br>&nbsp;&nbsp;'creating the much sought after, but rarely<br>&nbsp;&nbsp;'useful 'composit' index then<br>&nbsp;&nbsp;'moves input to [textbox3] !<br>&nbsp;&nbsp;'<br>&nbsp;&nbsp;'Textbox2 can actually be 'locked' to prevent alteration <br>&nbsp;&nbsp;'Incidently this is a great way to do some<br>&nbsp;&nbsp;'validatation for each field as input progresses.<br><br>End Sub<br><br><br><br> <p>Amiel<br><a href=mailto:amielzz@netscape.net>amielzz@netscape.net</a><br><a href= > </a><br>
 
I agree with Dirk gettiting the 3 digits to the other field, if you wish to change the 15 digit field to 12 digits in the process use:<br><br>Left([Claim],12)<br><br>Good Luck,<br>RDH <p>Ricky Hicks<br><a href=mailto: rdhicks@mindspring.com> rdhicks@mindspring.com</a><br><a href= > </a><br>
 
Once upon a time young people enlightened the computer world with their brilliance.<br><br>Now days they constatntly reminind us that the world of computer logic is in fact <i>finite</i>; and that age is <b>not</b> a qualifying factor.<br><br> <p>Amiel<br><a href=mailto:amielzz@netscape.net>amielzz@netscape.net</a><br><a href= > </a><br>
 
get the 15digit in [Claims] to an unbound textbox named [Free], then use the function right([Free],3) to move it to whatever field you want. After that, if you want claims to be only&nbsp;&nbsp;the first 12 digit use the function left([Free],12) to the [claims].<br><br>I think that's what you wanted to do. Have fun.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top