betachristopher
Programmer
I have read faq701-4233
I created the new module, but am having more problems. Is it because I'm trying to concatenate a field that is already concatenating two fields from two tables?
original code:
example of results:
abbrv name cpt_code
CFDNA CF DNA 83891 (x1)
CFDNA CF DNA 83892 (x1)
CFDNA CF DNA 83896 (x40)
CFDNA CF DNA 83900 (x1)
CFDNA CF DNA 83901 (x17)
CFDNA CF DNA 83903 (x1)
CFDNA CF DNA 83908 (x1)
CFDNA CF DNA 83912 (x1)
desired results:
abbrv name cpt_code
CFDNA CF DNA 83891 (x1), 83892 (x1), 83896 (x40), 83900 (x1), 83901 (x17), 83903 (x1), 83908 (x1), 83912 (x1)
modified code:
when I run the new query, I get an error message stating Syntax error (missing operator) in query expression 'Concatenate("SELECT code & " (x" & cptCount & ")" FROM CPT, Panel_CPT_Map, Panel WHERE name = " & [name] & " ")' and then it highlights the following section of my code: " & cptCount & "
Can anyone help me correct my syntax?
I created the new module, but am having more problems. Is it because I'm trying to concatenate a field that is already concatenating two fields from two tables?
original code:
Code:
SELECT Panel.abbreviation, Panel.name, CPT.code & " (x" & Panel_CPT_Map.cptCount & ")" AS cpt_code
FROM (CPT INNER JOIN Panel_CPT_Map ON CPT.cPTKey = Panel_CPT_Map.cptKey) INNER JOIN Panel ON Panel_CPT_Map.panelKey = Panel.panelKey
GROUP BY Panel.abbreviation, Panel.name, CPT.code & " (x" & Panel_CPT_Map.cptCount & ")"
ORDER BY Panel.abbreviation;
example of results:
abbrv name cpt_code
CFDNA CF DNA 83891 (x1)
CFDNA CF DNA 83892 (x1)
CFDNA CF DNA 83896 (x40)
CFDNA CF DNA 83900 (x1)
CFDNA CF DNA 83901 (x17)
CFDNA CF DNA 83903 (x1)
CFDNA CF DNA 83908 (x1)
CFDNA CF DNA 83912 (x1)
desired results:
abbrv name cpt_code
CFDNA CF DNA 83891 (x1), 83892 (x1), 83896 (x40), 83900 (x1), 83901 (x17), 83903 (x1), 83908 (x1), 83912 (x1)
modified code:
Code:
SELECT Panel.abbreviation, Panel.name, Concatenate("SELECT code & " (x" & cptCount & ")" FROM CPT, Panel_CPT_Map, Panel WHERE name = " & [name] & " ") AS cpt_code
FROM (CPT INNER JOIN Panel_CPT_Map ON CPT.cPTKey = Panel_CPT_Map.cptKey) INNER JOIN Panel ON Panel_CPT_Map.panelKey = Panel.panelKey
GROUP BY Panel.abbreviation, Panel.name, CPT.code & " (x" & Panel_CPT_Map.cptCount & ")"
ORDER BY Panel.abbreviation;
when I run the new query, I get an error message stating Syntax error (missing operator) in query expression 'Concatenate("SELECT code & " (x" & cptCount & ")" FROM CPT, Panel_CPT_Map, Panel WHERE name = " & [name] & " ")' and then it highlights the following section of my code: " & cptCount & "
Can anyone help me correct my syntax?