By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,605 Members | 1,325 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,605 IT Pros & Developers. It's quick & easy.

From text box to field

P: n/a
Don
Hi,

This seems a simple question, but I'm lost for the answer. Say, I
have two text boxes in a form: one for FirstName, one for LastName. I
want to combine them (which I can do OK) and enter the result into a
field called Name in a table. How do I do this?

Sorry to be so dumb. Many thanks,
Don

Feb 28 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On 27 Feb 2006 21:55:46 -0800, Don wrote:
Hi,

This seems a simple question, but I'm lost for the answer. Say, I
have two text boxes in a form: one for FirstName, one for LastName. I
want to combine them (which I can do OK) and enter the result into a
field called Name in a table. How do I do this?

Sorry to be so dumb. Many thanks,
Don


You don't! There is no need to.
So far you have correctly entered and saved your data.
Whenever you need to show the full name, simply concatenate the two
names, in a report or on a form, using an unbound control:
=[FirstName] & " " & [LastName]

Or in a query:
FullName:[FirstName] & " " & [LastName]

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Feb 28 '06 #2

P: n/a
Don
Actually, the form is for entering data into a table. I'm having the
user enter the first and last names separately. Then I want to
concatenate the two (as you have shown) and put this result into the
table. Sorry not to have explained more clearly. I've discovered I
can do this by including an Event procedure following entry of the last
name, such as:

Private Sub LastName_AfterUpdate()
Me.Name = Me.FirstName & " " & Me.LastName
End Sub

However, is there a simpler, more direct way, without involving VBA?
Thanks.

Don

Feb 28 '06 #3

P: n/a
On 28 Feb 2006 14:31:30 -0800, Don wrote:
Actually, the form is for entering data into a table. I'm having the
user enter the first and last names separately. Then I want to
concatenate the two (as you have shown) and put this result into the
table. Sorry not to have explained more clearly. I've discovered I
can do this by including an Event procedure following entry of the last
name, such as:

Private Sub LastName_AfterUpdate()
Me.Name = Me.FirstName & " " & Me.LastName
End Sub

However, is there a simpler, more direct way, without involving VBA?
Thanks.

Don


Don,
You missed the most important part of my reply.
"You Don't!"
There is absolutely no need to store redundant data.
There are more than enough posts stored at
http://www.groups.google.com
that I won't even begin to bother re-hashing the reasons not to.

Also, Name is a reserved word in Access and should not be used as a
field name.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Feb 28 '06 #4

P: n/a
Don
Fred,

Thanks and sorry for the sloppiness regarding Name. I'll obviously have
to re-think things a bit.

Don

Mar 2 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.