473,324 Members | 1,678 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,324 software developers and data experts.

Inserting Spaces Between Fields in Expression Builder

Hi All,

This will probably have the easiest solution but as I'm still a newbie
and need some help...

When building a query I would like to create a field called Name which
includes both the first and last name of the person.

Here's the expression:

Name: [tblStaff]![FirstName]+[tblStaff]![LastName]

It works great except for the fact that the is no space between the
first and last name.

Ideas???

Thanks in advance,
Darren Stahlhut.
Nov 12 '05 #1
2 16923
Darren wrote:
Hi All,

This will probably have the easiest solution but as I'm still a newbie
and need some help...

When building a query I would like to create a field called Name which
includes both the first and last name of the person.

Here's the expression:

Name: [tblStaff]![FirstName]+[tblStaff]![LastName]

It works great except for the fact that the is no space between the
first and last name.

Ideas???

Thanks in advance,
Darren Stahlhut.


Hi Darren

You need to put in the space explicitly. Either of these should
work:

FullName: [tblStaff]![FirstName]+" "+[tblStaff]![LastName]
OR
FullName: [tblStaff]![FirstName]+chr(32)+[tblStaff]![LastName]

(32 being the ASCII code for the space character)
Note, it may be safer to call your calculated field something
like FullName as there is already a built-in Access property
called Name.

Cheers

Nov 12 '05 #2
Helen Wheels <he**********@yahoo.com.au> wrote in message news:<40**************@yahoo.com.au>...
Darren wrote:
Hi All,

This will probably have the easiest solution but as I'm still a newbie
and need some help...

When building a query I would like to create a field called Name which
includes both the first and last name of the person.

Here's the expression:

Name: [tblStaff]![FirstName]+[tblStaff]![LastName]

It works great except for the fact that the is no space between the
first and last name.

Ideas???

Thanks in advance,
Darren Stahlhut.


Hi Darren

You need to put in the space explicitly. Either of these should
work:

FullName: [tblStaff]![FirstName]+" "+[tblStaff]![LastName]
OR
FullName: [tblStaff]![FirstName]+chr(32)+[tblStaff]![LastName]

(32 being the ASCII code for the space character)
Note, it may be safer to call your calculated field something
like FullName as there is already a built-in Access property
called Name.

Cheers


Hi Helen,

That is exactly what I needed :) Thanks

Darren Stahlhut
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Fran Zablocki | last post by:
I am trying to write an expression that converts one set of values to another. There are two fields, STAGE and ADMIT_TYPE, which are used as input criteria, and the final converted values are...
1
by: Grant Hammond | last post by:
I assume I'm not alone in my frustration that the expression builder that comes (in part) with Access XP that dosnt wrap text when you open it on an exisitng expression in a query or form. I's...
1
by: tnt | last post by:
I have set up a table and a form initially when i use these without modifications the data transfers fine. However when i use the expression builder to create a calculation in one of the form...
1
by: Laertes | last post by:
Hi, I want to use the expression builder in a query to define a field. I know how to do it for simple fields, like the one below : orderdate: IIf((IsNull() And =False) Or (<>"N/A" And...
3
by: X_HOBBES | last post by:
I'm fairly new to Access, let alone Expression Builder. However, it seems that I'm either doing something really wrong or Access is really stupid! I can't reference fields that show up on my...
2
by: Mike Turco | last post by:
I like using the expression builder for a lot of different things but it isn't always available when I want to use it, for example in the code window, or in all of the control properties. I am...
2
by: shahla.saeed | last post by:
wat i want is to insert the calculated values(simple addition or subtraction) in fields of my table by using expression builders in my forms..i have made that feild in the table but still it...
3
by: Nigel C | last post by:
My problem is best explained by way of tables and examples... I am using Access 2000 (in case this is relevant) and I have a table with the following fields... Field names ------------ Code ...
0
by: AlexanderTodorovic | last post by:
Hello Everyone, I'm developing a client application in which the users need an expression builder as provided in MS Access 2003. I would like to use the expression builder in a C# application....
3
by: rrosynek | last post by:
I have a 2003 Access Database with several tables related in a one to many relationship with a parent I am looking to build a report which evaluates if different users of the table have all entered...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.