Update One Field Using Two Fields

TrekMietta

Registered User.
Local time
Today, 20:16
Joined
Sep 17, 2009
Messages
26
Using Access 2007:

I have a table called "Staff" with three fields "firstName", "lastName" and "fullName";
and a form with three bound text boxes bound to these values:

How can i update automatically change the value of fullName to inlcude firstName and last name?

For example:
firstName = Trek
lastName = Mietta

then fullName should automatically change to: "Trek Mietta" (With a space inbetween them)

Thanks in Advance
 
You should not store the full name in a table field. To do so is a breach of normalization.
Where you need to work with the whole name you should create it as required in a query or textbox.
The Control Source of the textbox on the form:
[firstname] & " " & [lastname]
 
As GalaxiomAtHome said, you should not be trying to store the concatenated field but instead you use a query to do so and display it to whatever you need (remember, you can use a QUERY almost wherever you can use a table).
 
OKay your probably going to shout at me here for suggesting concatenating two fields again but this would make life so much easier:

Again I have the table called "Staff" with three fields "firstName", "lastName" and "username";
and a form with three bound text boxes bound to these values:

How can i update automatically change the value of username to inlcude firstName and lastName?

For example:
firstName = Trek
lastName = Mietta

eg: username = "firstName.lastName"
(With a period "." in between them and all lowercase)

Thanks in Advance
 
still not!

if you need it assembling like that just say

forename & "." & lastname
 
Again, I will state - you do NOT need to add it to the table. If you build a query which displays all fields including that concatenated one, you can use that query in place of a table where you would be using a table.
 

Users who are viewing this thread

Back
Top Bottom