F
Flora
I have a combo box that I'd like to format so that the selections in
the dropdown list have the following format: PCP-01-01-01. (The
selected value is displayed in the correct format). Currently, the
values in the dropdown list look like: 010101 but I want the formatted
characters PCP- - - to show as well.
Currently the rowsource code looks like this
SELECT tbl_CONTROL_MATRIX.[PCP-SP-Ref]
FROM tbl_CONTROL_MATRIX
ORDER BY tbl_CONTROL_MATRIX.[PCP-SP-Ref];
I tried to add the format function into the sql code above but I can't
get it right. Here are some of my attempts:
SELECT format(tbl_CONTROL_MATRIX.[PCP-SP-Ref], ""PCP-"##"-"##"-"##")
SELECT format(tbl_CONTROL_MATRIX.[PCP-SP-Ref], "'PCP-'##'-'##'-'##")
SELECT format(tbl_CONTROL_MATRIX.[PCP-SP-Ref], ""PCP-"@@-@@-@@)
and an assortment of other attempts.
I'm tired of hacking this problem. All the resources that I've looked
into describe the format function for date, time or case.What is the
correct way to use the format function in my situation?
Thanks for your help.
Cheers!!
the dropdown list have the following format: PCP-01-01-01. (The
selected value is displayed in the correct format). Currently, the
values in the dropdown list look like: 010101 but I want the formatted
characters PCP- - - to show as well.
Currently the rowsource code looks like this
SELECT tbl_CONTROL_MATRIX.[PCP-SP-Ref]
FROM tbl_CONTROL_MATRIX
ORDER BY tbl_CONTROL_MATRIX.[PCP-SP-Ref];
I tried to add the format function into the sql code above but I can't
get it right. Here are some of my attempts:
SELECT format(tbl_CONTROL_MATRIX.[PCP-SP-Ref], ""PCP-"##"-"##"-"##")
SELECT format(tbl_CONTROL_MATRIX.[PCP-SP-Ref], "'PCP-'##'-'##'-'##")
SELECT format(tbl_CONTROL_MATRIX.[PCP-SP-Ref], ""PCP-"@@-@@-@@)
and an assortment of other attempts.
I'm tired of hacking this problem. All the resources that I've looked
into describe the format function for date, time or case.What is the
correct way to use the format function in my situation?
Thanks for your help.
Cheers!!