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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display a Name entered in a single field in two fields on form

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Hi there.


I have a table where name is entered in a single field using Last Name,First Name format. I would like to have a display on a form as a Last_Name First_Name in two separate fields in order to compare it with recordset of similar nature. Thnks in advance
 
This will probably cause more trouble than you really want to deal w/, because if you don't get the data entry to be "right", there will be to many variations/exceptions to the actual format that you will never get all of them corrected.

BUT ... done in Debug/immediate window should get you started down the proverbial "Yellow Brick World". Just apply the functions to the text boxes, referencing the field name.

FullName = "Red, Michael"
NameL = Trim(LEft(FullName, Instr(FullName, ",") -1))
? NameL
Red
NameF = Trim(Right(FullName, Len(FullName) - Instr(FullName, ",")))
? NameF
Michael
[sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top