473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

From text box to field

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
4 1226
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Alfredo Agosti | last post by:
Hi folks, I have an Access 2000 db with a memo field. Into the memo field I put text with bold attributes, URL etc etc What I need to to is converting the rich text contained into the memo...
7
by: Rick Caborn | last post by:
Does anyone know of a way to execute sql code from a dynamically built text field? Before beginning, let me state that I know this db architecture is built solely for frustration and I hope to...
9
by: Jack | last post by:
Hi, I got a asp form page where the POST ACTION = confirmation.asp page is used to save the values collected from text boxes from the form in a database. For example txtTotalOutlay field is being...
3
by: Roy Adams | last post by:
Hi I'm reposting this question because for some reason can't post follow up question to this thread. What I'm trying to do is put the value and text from a a select in to a text field and to a...
6
by: Sam Lazarus | last post by:
I need to import data from a website, but the text is arranged badly: Name:John Doe Title:Grunt ID:314159 Name:Jane Doe Title:Queen-Bee ID:271828 etc...
3
by: tony lock | last post by:
I am writing a simulation program, the main classes inherit from a base class which itself inherits from Control. I am using reflection to serialize these objects including the fields from control....
1
by: Harry Devine | last post by:
I have a DataGrid that is configured to use the Edit/Update/Cancel concept correctly. My grid shows values from 5 database fields. I only need to update that last 4 fields. The last field is a...
9
by: sellcraig | last post by:
Microsoft access 2 tables table "data main" contains a field called "code" table "ddw1" is created from a make table query of "data main" Goal- the data in "code" field in needs to...
4
by: Debbiedo | last post by:
My software program outputs an XML Driving Directions file that I need to input into an Access table (although if need be I can import a dbf or xls) so that I can relate one of the fields...
5
by: kanley | last post by:
I have a main table with a text description field. In this field, its populated with a string of data. I need to identify from this string of data the name of the vendor using some keywords. I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.