S
Steve S
I use the following query to provide selected input into another query and it
works fine as long as I hardcode the 9919 and 'SS ID 13'. there are other
column headings such as 'SS ID 14', 'SS ID 5' and so forht that I need to use
in the query depending on which event a contestant has entered.
How do I code this to dynamicaly change the column used in the query?
FormA.fld2 contains the value I want to use to select the correct column.
SELECT 9910 AS [Entry ID], [Penalty SS XRef].[Penalty ID], 0 AS Penalty,
[Penalty SS XRef].[SS ID 13] AS [Sort Key]
FROM [Penalty SS XRef]
WHERE ((([Penalty SS XRef].[SS ID 13])>0));
I can switch columns using a string in a VBA form module but I need to do
this within a query.
works fine as long as I hardcode the 9919 and 'SS ID 13'. there are other
column headings such as 'SS ID 14', 'SS ID 5' and so forht that I need to use
in the query depending on which event a contestant has entered.
How do I code this to dynamicaly change the column used in the query?
FormA.fld2 contains the value I want to use to select the correct column.
SELECT 9910 AS [Entry ID], [Penalty SS XRef].[Penalty ID], 0 AS Penalty,
[Penalty SS XRef].[SS ID 13] AS [Sort Key]
FROM [Penalty SS XRef]
WHERE ((([Penalty SS XRef].[SS ID 13])>0));
I can switch columns using a string in a VBA form module but I need to do
this within a query.