Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
weedavie22
Starting Member
24 Posts |
Posted - 2004-08-18 : 05:32:31
|
Wondering if anyone can help.I have a section in my database that takes the individual fields of an contact address and combines them in a textbox.The fields are [streetnum], [street], [town], [postcode] which in my textbox become:= [streetnum]& " " &[street] &" "& [town] &" "& [postcode]which becomes123fake streetanytownanypostcodeMy question is, if one of the fields doesn't exist can I supress that blank field rather than having a space ie.123 anytownanypostcodeTo,123anytownanypostcodeThanks for any help Dave |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2004-08-18 : 05:42:06
|
well you could do something like thisnest the iif's in a way that works for you...iif(isnull([street]), ' ' + iif(isnull([town]), '' + ..., [town]), [street])Go with the flow & have fun! Else fight the flow :) |
 |
|
weedavie22
Starting Member
24 Posts |
Posted - 2004-08-18 : 06:25:36
|
Thanks for the quick reply, still not working though.Its always these wee things that bug me in access :) |
 |
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2004-08-18 : 06:47:25
|
spirit's has basically answered your question, you can accomplish this using the IIF and/or the Nz (Access's ISNULL equivalent) function.You'll just need to do some experimentation to get it to work for you. |
 |
|
|
|
|