Noob Report Question. (First+ last name) (1 Viewer)

djshrew

Registered User.
Local time
Today, 05:55
Joined
May 29, 2006
Messages
60
I am trying to get first name and last name in one box. i can do it with 2 boxes. Box one has FirstName and box two has last name.

so i tried =[FirstName] & " " & [LastName] in 1 box. but it says error.

Please Help.

If it helps i am trying to create Address lables.

E.G
First name surename
Address1
Address2
Address3
PostCode
 

Michael J Ross

Registered User.
Local time
Today, 05:55
Joined
Mar 2, 2006
Messages
245
Assuming youve set the control source of your text box to that then it should work.

Do you have both text boxes in your report? (they need to be there, although they can be hidden so nobody can see them)

Have you checked spellings to make sure they're correct i.e. the same as your field names?
 

djshrew

Registered User.
Local time
Today, 05:55
Joined
May 29, 2006
Messages
60
I dont have them there i will try that and report back, thank you for your quick response.

---[Edit]---

Work great now thankyou so much. the problem was that i did't have the 2 boxes with First Name & Last Name. thought i could just get away with the code.
Put them in and works fine, thankyou so much i could have been scratching my head for a while with that one.
 
Last edited:

GaryPanic

Smoke me a Kipper,Skipper
Local time
Yesterday, 21:55
Joined
Nov 8, 2005
Messages
3,294
also try this

Fulldetails: [Insured] & IIf(IsNull([add1]),"",Chr(13) & Chr(10) & [add1]) & IIf(IsNull([add2]),"",Chr(13) & Chr(10) & [add2]) & IIf(IsNull([add3]),"",Chr(13) & Chr(10) & [add3]) & IIf(IsNull([add4]),"",Chr(13) & Chr(10) & [add4]) & IIf(IsNull([postcode]),"",Chr(13) & Chr(10) & [postcode])

this will remove blank lines

insured
add1
add2
add3
add4
postcode


if one of these is missing (except the first - it wll drag everything up and its all done in one field ina qry and then avaibale on a report as 1 field (set it to can grow/shrink - yes

(none of my work - i nicked it --- ) makes me look clever than i really am):)
 
R

Rich

Guest
You don't need the first and last names on the Report, only in the underlying query, delete the original text boxes and make sure there are none with the same names as the fields you want to join together
 

Michael J Ross

Registered User.
Local time
Today, 05:55
Joined
Mar 2, 2006
Messages
245
Well I've learned something new, i was taught to always include the fields on the report even if they're not displayed.

Guess I was given duff information, I'll remember they dont need to go on the report now, thanks.
 

Bilbo_Baggins_Esq

Registered User.
Local time
Yesterday, 23:55
Joined
Jul 5, 2007
Messages
586
Perhaps I'm doing it bassakwards, but when I've had to do addresses in a report, based off a query, I'll typically do the name and address construction in the actual query.
Then the report creation and formatting seems easier to do.

This seems beneficial if there is a bunch of checking involved during the construction.
for example in a mortgage report, is there a man and wife listed, and if so are thier last names the same, are middle initials provided, etc.


It's probably 6 of one, half a dozen of the other, but I thought I'd share it.
 

djshrew

Registered User.
Local time
Today, 05:55
Joined
May 29, 2006
Messages
60
also try this

Fulldetails: [Insured] & IIf(IsNull([add1]),"",Chr(13) & Chr(10) & [add1]) & IIf(IsNull([add2]),"",Chr(13) & Chr(10) & [add2]) & IIf(IsNull([add3]),"",Chr(13) & Chr(10) & [add3]) & IIf(IsNull([add4]),"",Chr(13) & Chr(10) & [add4]) & IIf(IsNull([postcode]),"",Chr(13) & Chr(10) & [postcode])

this will remove blank lines

insured
add1
add2
add3
add4
postcode


if one of these is missing (except the first - it wll drag everything up and its all done in one field ina qry and then avaibale on a report as 1 field (set it to can grow/shrink - yes

(none of my work - i nicked it --- ) makes me look clever than i really am):)

This looks interesting thank i will try this later. as this would work nicer, altho i have the basic thing working so far. but would make a cleaner image, Thankyou.

Den
 

Users who are viewing this thread

Top Bottom