Solved

how do I make the lastname and first show

Posted on 2011-03-08
7
332 Views
Last Modified: 2012-05-11
How do I make the last name and first name show in the box with red circle around.  See attached. screen screen
0
Comment
Question by:Kdankwah
7 Comments
 
LVL 17

Expert Comment

by:Barry Cunney
ID: 35073754
If the box you are referring to is a combo box the for the rowsource query you need a expression field in the query which concatenates the forst name and last name from the separate first name and last name fields in the relevant underlying table - In Design select box and press F4 for the poperties
0
 

Author Comment

by:Kdankwah
ID: 35073779
This is the syntax I am using on the field.  I need to get it to read first and lastname together

SELECT [Contacts Extended].[Last Name], [Contacts Extended].[First Name], [Contacts Extended].ID
FROM [Contacts Extended]
ORDER BY [Contacts Extended].[Last Name], [Contacts Extended].[First Name], [Contacts Extended].ID;
0
 
LVL 19

Expert Comment

by:Eric Sherman
ID: 35073821
In your ComboBox, what is the Bound Field (Employee ID, Last Name, etc.)???

Can you upload a sample db in Access 2000 format???


ET
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:Kdankwah
ID: 35073892
Its bound to last name, but I can change to ID.
0
 
LVL 19

Expert Comment

by:Eric Sherman
ID: 35074430
<<<<<Its bound to last name, but I can change to ID.>>>>>>

What do you need it to be??

Can you upload a sample ...  will probably make it a lot faster.

ET
0
 
LVL 19

Expert Comment

by:Eric Sherman
ID: 35074557
Also, I would change the Bound Field to a Unique ID field so you will handle duplicate last names properly.

ET
0
 
LVL 6

Accepted Solution

by:
JVWC earned 500 total points
ID: 35080575
You'll need to change the layout of your combo for the different nomber of columns...

Something like:

SELECT [Contacts Extended].[Last Name] & " " & [Contacts Extended].[First Name] AS FullName, [Contacts Extended].ID
FROM [Contacts Extended]
ORDER BY [Contacts Extended].[Last Name], [Contacts Extended].[First Name], [Contacts Extended].ID;

Cheers
JC
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Suggested Solutions

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now