Text Box autopopulate

G

Guest

Is it possible to display (autopopulate) the first 3
characters in Text box2 from Text box1 where the
characters here can be of any length?

Thanks for all the help.
 
M

Marshall Barton

Is it possible to display (autopopulate) the first 3
characters in Text box2 from Text box1 where the
characters here can be of any length?


Sound like there's something funny going on here. You
probably shouls be using three fields instead of two.

Back to your question, use code in textbox1's AfterUpdate
event or textbox2's Enter event (depending on what you want)
to set the characters into the text box:

If IsNull(Me.textbox2) Then
If Len(Nz(Me.textbox1, "")) >= 3 Then
Me.Textbox2 = Left(Me.textbox1)
End If
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top