Board index » Visual Studio » Mirror TextBox Text

Mirror TextBox Text

Visual Studio252
I have four text boxes (FirstName, MI, LastName, FullName)



I want to be able to fill in the FullName text box WHILE typing in the

FirstName field. Then I want to type in the MI field while updating the

FullName text box. And finally, I want to type in the LastName text box

while filling in the FullName textbox. So, in other words, whatever I type

in any of the three fields, it should show the same text in the FullName

text box. I also want to account for the deletion of individual letters too.



A great example of what I am trying to accomplish can be found in the

New/Copy user funtionality of Active Directory. I am trying to copy exactly

what that does. I have been working on the code for hours now but I just

can't seem to make everything work the way I want it to.



Any help will be much appreciated



TIA

RC-


-
 

Re:Mirror TextBox Text



"RC-" <r_candee@hotmail.com>wrote in message



Quote
I have four text boxes (FirstName, MI, LastName, FullName)



I want to be able to fill in the FullName text box WHILE typing in the

FirstName field. Then I want to type in the MI field while updating the

FullName text box. And finally, I want to type in the LastName text box

while filling in the FullName textbox. So, in other words, whatever I type

in any of the three fields, it should show the same text in the FullName

text box. I also want to account for the deletion of individual letters

too.



A great example of what I am trying to accomplish can be found in the

New/Copy user funtionality of Active Directory. I am trying to copy

exactly what that does. I have been working on the code for hours now but

I just can't seem to make everything work the way I want it to.



So look into the Change event of the text box object.





-

Re:Mirror TextBox Text

I've been using the Control_KeyUp event, is that not the way to go? I guess

not since I can't figure it out.





"Jeff Johnson [MVP: VB]" <i.get@enough.spam>wrote in message

Quote


"RC-" <r_candee@hotmail.com>wrote in message

news:e7XXHLXPGHA.3728@tk2msftngp13.phx.gbl...



>I have four text boxes (FirstName, MI, LastName, FullName)

>

>I want to be able to fill in the FullName text box WHILE typing in the

>FirstName field. Then I want to type in the MI field while updating the

>FullName text box. And finally, I want to type in the LastName text box

>while filling in the FullName textbox. So, in other words, whatever I

>type in any of the three fields, it should show the same text in the

>FullName text box. I also want to account for the deletion of individual

>letters too.

>

>A great example of what I am trying to accomplish can be found in the

>New/Copy user funtionality of Active Directory. I am trying to copy

>exactly what that does. I have been working on the code for hours now but

>I just can't seem to make everything work the way I want it to.



So look into the Change event of the text box object.







-

Re:Mirror TextBox Text

DadGumIt, sometimes I really, really overthink things ;-)



Thanks for the help Jeff!!



"Jeff Johnson [MVP: VB]" <i.get@enough.spam>wrote in message

Quote


"RC-" <r_candee@hotmail.com>wrote in message

news:e7XXHLXPGHA.3728@tk2msftngp13.phx.gbl...



>I have four text boxes (FirstName, MI, LastName, FullName)

>

>I want to be able to fill in the FullName text box WHILE typing in the

>FirstName field. Then I want to type in the MI field while updating the

>FullName text box. And finally, I want to type in the LastName text box

>while filling in the FullName textbox. So, in other words, whatever I

>type in any of the three fields, it should show the same text in the

>FullName text box. I also want to account for the deletion of individual

>letters too.

>

>A great example of what I am trying to accomplish can be found in the

>New/Copy user funtionality of Active Directory. I am trying to copy

>exactly what that does. I have been working on the code for hours now but

>I just can't seem to make everything work the way I want it to.



So look into the Change event of the text box object.







-

Re:Mirror TextBox Text

"RC-" <r_candee@hotmail.com>wrote in message



Quote
I want to be able to fill in the FullName text box WHILE typing in

the FirstName field. Then I want to type in the MI field while

updating the FullName text box. And finally, I want to type in the

LastName text box while filling in the FullName textbox.



How about something like the following.



Mike



Option Explicit

Private Sub BuildFullName()

txtFullname.Text = txtFirstName.Text & " " & _

txtMI.Text & " " & txtLastname.Text

End Sub



Private Sub Form_Load()

txtFirstName.Text = ""

txtMI.Text = ""

txtLastname.Text = ""

End Sub



Private Sub txtFirstName_Change()

BuildFullName

End Sub



Private Sub txtMI_Change()

BuildFullName

End Sub



Private Sub txtLastname_Change()

BuildFullName

End Sub







-