Concatenation

Pharcyde

Arriba Arriba!!!
Local time
Today, 21:53
Joined
Sep 4, 2003
Messages
116
Concatenation!!!!

Afternoon yall!

If I have the fields address1, address2, address3,address4 and PostCode(or ZipCode) how can i merge them all into one block?

Only 1 address item per line, and if one is left blank then it skips that line and brings the next one up, so there are no gaps in the address block...

Cheers, LeeBoy:cool:
 
CompleteAddress: Nz([Address1]) & Nz([Address2]) & etc.
 
Once agian many thanks mile o:D
 
Not sure if that will give you 1 line per address. You may need to insert some control characters in between the addresses. You may also need to add some immediate Ifs to acount for empty addresses.
 
CompleteAddress: Nz([Address1]) & Nz([Address2]) & Nz([Address3]) & Nz([Address4]) & " - " & [ZipCode]

theprez said:
Not sure if that will give you 1 line per address. You may need to insert some control characters in between the addresses. You may also need to add some immediate Ifs to acount for empty addresses.

Nz returns a zero-length string if the value is null.
________
Free porn
 
Last edited:
a.sinatra,

Drop some knowledge on me. I know about the NZ command, but he wanted 1 address item per line. Even with the NZ, don't we need some control characters in between (i.e. vbCRLF) and don't we have to account for the new blank lines if an address is null?
 
theprez said:
a.sinatra,

Drop some knowledge on me. I know about the NZ command, but he wanted 1 address item per line. Even with the NZ, don't we need some control characters in between (i.e. vbCRLF) and don't we have to account for the new blank lines if an address is null?

Sorry, If i only could read :D

Didnt realize he wanted one per line i was just going of Phile's example.

He should just be able to create a query and specify "Is Not Null" in the Criteria for each field. And then have that query linked to his form instead, correct?
________
CHRYSLER 300M SPECIFICATIONS
 
Last edited:

Users who are viewing this thread

Back
Top Bottom