Need text field in form that changes with each record

  • Thread starter Thread starter Fred Worthington
  • Start date Start date
F

Fred Worthington

Greetings:

My Form has individual fields for FirstN, MI, and LastN. I want to place a
single text field at the top of the form which will display the full name
(First-Middle-Last) for each record. Also, the first, middle and last name
should have spaces between them.

Thanks . . . Fred
 
Fred

While you might be able to find some "parsing" routine via Google.com or at
mvps.org, what you are describing is a fairly straightforward function.
You'll need to write (or at least understand, if you search one out) a
function that:
inspects, collects, and formats (spaces/punctuation) the contents of your three fields, then
sets the value of your FullName textbox to the result

And you'll need to call that function after every change (AfterUpdate) in
each one of the three fields.
 
Thanks Jeff,

Perhaps you can expand a little on your solution. I have succeeded in
creating a FullName text box with the following syntax: =Forms![Class
Member]!FirstN+[MI}+[LastN]. But I still have two problems. One, there is
no space between the names. Second, the FullName text box does not update
for each Form. A little more guidance would be greatly appreciated.

Thanks . . . Fred
 
To anyone following this string, here is the solution:

=Forms![Class Member]!FirstN&" "&[MI}&" "&[LastN]. Apparently using &
instead of + causes the field to update correctly and the " " marks create
the space.

Thanks . . . Fred


Fred Worthington said:
Thanks Jeff,

Perhaps you can expand a little on your solution. I have succeeded in
creating a FullName text box with the following syntax: =Forms![Class
Member]!FirstN+[MI}+[LastN]. But I still have two problems. One, there is
no space between the names. Second, the FullName text box does not update
for each Form. A little more guidance would be greatly appreciated.

Thanks . . . Fred


Jeff Boyce said:
Fred

While you might be able to find some "parsing" routine via Google.com or at
mvps.org, what you are describing is a fairly straightforward function.
You'll need to write (or at least understand, if you search one out) a
function that:

And you'll need to call that function after every change (AfterUpdate) in
each one of the three fields.

--
Good luck

Jeff Boyce
<Access MVP>

place
 
Back
Top