| | |
Microsoft Access - removing spaces and dashes...
![]() |
I do apologise if this thread has been started in the wrong section. - Wasn’t sure where to put it...
________________________________________________________________
I am using Microsoft Access with a select query to combine 4 separate fields into 1 field for each record using the following expression:..
Expr1: ([prod_group_name] & " - " & [model] & " - " & [size] & " - " & [amps])
This part works fine, and gives me an output that looks something like this:..
"Amazon low voltage submersible pumps - Amazon 12v - 4.5"
Now some records have empty fields, and in which case nothing is shown. I.E. "RS sub pumps" have no size or amperage, so it comes out like this...
"RS submersible pumps - RS-150 - -" - (with the prevailing dashes and spaces which are not needed.)
So basically what I want to do is make it automatically put the spaces and dashes in ONLY if they are needed... Is this actually possible in Access? And if so, how could my expression be modified to do so?
Thanks for your time, any help greatly appreciated...
NuGG
________________________________________________________________
I am using Microsoft Access with a select query to combine 4 separate fields into 1 field for each record using the following expression:..
Expr1: ([prod_group_name] & " - " & [model] & " - " & [size] & " - " & [amps])
This part works fine, and gives me an output that looks something like this:..
"Amazon low voltage submersible pumps - Amazon 12v - 4.5"
Now some records have empty fields, and in which case nothing is shown. I.E. "RS sub pumps" have no size or amperage, so it comes out like this...
"RS submersible pumps - RS-150 - -" - (with the prevailing dashes and spaces which are not needed.)
So basically what I want to do is make it automatically put the spaces and dashes in ONLY if they are needed... Is this actually possible in Access? And if so, how could my expression be modified to do so?
Thanks for your time, any help greatly appreciated...
NuGG
Pubonwheels - Mobile Bar Services for the South West of England.
The Kings Head Inn - The Kings Head, Underhill, Coleford, Somerset, UK.
South West Ravers - Going out to all you jungle drum and bass ravers.
UFB Live Radio - Keep It Locked.
The Kings Head Inn - The Kings Head, Underhill, Coleford, Somerset, UK.
South West Ravers - Going out to all you jungle drum and bass ravers.
UFB Live Radio - Keep It Locked.
Hi,
Use the inbuilt function nz
Expr1: (nz([prod_group_name],"") & " - " & nz([model],"") ....
Use the inbuilt function nz
Expr1: (nz([prod_group_name],"") & " - " & nz([model],"") ....
It is never about the number of languages you know, you either have the logic of programming or you don't ...
Some of the codes I post are collected from different sites during the past couple of years, so I would like to thank them for their help and for enabling me to help.
Some of the codes I post are collected from different sites during the past couple of years, so I would like to thank them for their help and for enabling me to help.
![]() |
Other Threads in the Windows Software Forum
- Previous Thread: Eror Unable to update system registry
- Next Thread: Viewer for DjVu and PDF
| Thread Tools | Search this Thread |
acquisition acquisitions agile albany applications apps asp bailout ballmer beta billgates binary blackberry bostock browser budapest business cisco creativesuite4 development download ebay economicgrowth economy email excel exchange facebook freesoftware gaming gay google gta halo hard hp htc ibm icahn ie8 intel internet java jobs law linux mac merger microsoft microsoftoffice mobile net news nintendo novell office officefileformats officesuites openoffice openoffice.org opensource opensuse os outlook patent pfizer piracy redhat rim screen security sex siliconvalley software softwaretest sony survey takeover techwriting timetracking timewardenltd. training twitter virtualization vista vmware web wii windows windows7 windowslive wordpress work xbox xbox360 yahoo yahoo! yang zephyr2 zoho





