A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Reports and making it look prettier: Last Name, First Name Rank



 
 
Thread Tools Display Modes
  #1  
Old December 3rd, 2009, 12:32 PM posted to microsoft.public.access.reports
Kimberly3626
external usenet poster
 
Posts: 26
Default Reports and making it look prettier: Last Name, First Name Rank

I'm trying to pretty up my report by eliminating the forced space created by
having one field of the report for 'LastName', one for 'FirstName', and one
for 'Rank.' The Rank isn't too huge of an issue, and if three items in one
field gets to be too much, I have no problem leaving that as a side item of
sorts. But, I want my report to look a bit better by putting the names
together!

I want the report to go to my table, pull the LastName from that column, and
pair it with the matching FirstName in the column to the right. (Since it's
just looking up the personnel data, and I only have 22 personnel assigned, I
blew off a query for this particular report...it's a nice easy one)

So I found (by the magical search box) this line of code right here in the
MS forums:
=[FirstName] & " " & [LastName]

I tried it. Didn't work. And yes, the spelling is identical, and I even
paid attention to the capitol letters, just in case.

Then I tried to go in and build the string by clicking the ... button.
=[FirstName] & [LastName] (I just want it to work, I'll worry about the
space when I get the basics down)
Didn't work!

But...I'll admit that I didn't delete the original fields, just in case I
couldn't make it work right. Could this be the problem? It saw my little
line of code, along with the fields for FirstName and LastName and got mad at
me?

Please help...I found the code that works for everyone...but me! What did I
do wrong?!?!?!

PS: Access 2007
  #2  
Old December 3rd, 2009, 03:41 PM posted to microsoft.public.access.reports
John Spencer
external usenet poster
 
Posts: 7,815
Default Reports and making it look prettier: Last Name, First Name Rank

Didn't work? What does that mean? Did you get an error message, nothing
displayed, #Name in the control?

I suspect that you did not change the name of the control and therefore access
is confused on whether you are referring to the field LastName or the control
LastName. Try changing the control's name (properties: Other tab) to
txtFullName and then using the following as the control's source
= =[FirstName] & " " & [LastName] & ", " & [Rank]

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

Kimberly3626 wrote:
I'm trying to pretty up my report by eliminating the forced space created by
having one field of the report for 'LastName', one for 'FirstName', and one
for 'Rank.' The Rank isn't too huge of an issue, and if three items in one
field gets to be too much, I have no problem leaving that as a side item of
sorts. But, I want my report to look a bit better by putting the names
together!

I want the report to go to my table, pull the LastName from that column, and
pair it with the matching FirstName in the column to the right. (Since it's
just looking up the personnel data, and I only have 22 personnel assigned, I
blew off a query for this particular report...it's a nice easy one)

So I found (by the magical search box) this line of code right here in the
MS forums:
=[FirstName] & " " & [LastName]

I tried it. Didn't work. And yes, the spelling is identical, and I even
paid attention to the capitol letters, just in case.

Then I tried to go in and build the string by clicking the ... button.
=[FirstName] & [LastName] (I just want it to work, I'll worry about the
space when I get the basics down)
Didn't work!

But...I'll admit that I didn't delete the original fields, just in case I
couldn't make it work right. Could this be the problem? It saw my little
line of code, along with the fields for FirstName and LastName and got mad at
me?

Please help...I found the code that works for everyone...but me! What did I
do wrong?!?!?!

PS: Access 2007

  #3  
Old December 3rd, 2009, 03:48 PM posted to microsoft.public.access.reports
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Reports and making it look prettier: Last Name, First Name Rank

Kimberly3626,
First, when posting a question, "doesn't work" really doesn't tell us
anything.
Did the calculation display blank? Or #Name? Or some error?

Assuming your table/query has two fields named FirstName and LastName,
and you have 2 text controls on your report named FirstName and LastName,
and the ControlSource of each control is FirstName and LastName
respectively... and FirstName = "Bill" and LastName = "Smith"

Then... an unbound text control with a calculated (concatenated)
ControlSource of...
=[FirstName] & " " & [LastName]
would display as "Bill Smith" (without quotes).

Note: When this concatenation finally works, it's not necessary that
separate
controls... FirstName and LastName be retained on the report. The
concatenation, on it's own, will work.

Otherwise, there is some other problem besides the concatenation itself
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


"Kimberly3626" wrote in message
...
I'm trying to pretty up my report by eliminating the forced space created
by
having one field of the report for 'LastName', one for 'FirstName', and
one
for 'Rank.' The Rank isn't too huge of an issue, and if three items in
one
field gets to be too much, I have no problem leaving that as a side item
of
sorts. But, I want my report to look a bit better by putting the names
together!

I want the report to go to my table, pull the LastName from that column,
and
pair it with the matching FirstName in the column to the right. (Since
it's
just looking up the personnel data, and I only have 22 personnel assigned,
I
blew off a query for this particular report...it's a nice easy one)

So I found (by the magical search box) this line of code right here in the
MS forums:
=[FirstName] & " " & [LastName]

I tried it. Didn't work. And yes, the spelling is identical, and I even
paid attention to the capitol letters, just in case.

Then I tried to go in and build the string by clicking the ... button.
=[FirstName] & [LastName] (I just want it to work, I'll worry about the
space when I get the basics down)
Didn't work!

But...I'll admit that I didn't delete the original fields, just in case I
couldn't make it work right. Could this be the problem? It saw my little
line of code, along with the fields for FirstName and LastName and got mad
at
me?

Please help...I found the code that works for everyone...but me! What did
I
do wrong?!?!?!

PS: Access 2007




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.