Swap field names in code

  • Thread starter Thread starter Razor
  • Start date Start date
R

Razor

Hi,

I have a print job that is launched from a form and
generates a dozen reports.

The filter is supplied through a listbox on the form.

Is there any way I could have the queries run off a
different field?

In essence, I need to swap the fields "Report Client"
and "Report Client1".

I have so far been going into design view of the table and
changing the field names, but this method is cloogy and
error-prone.

Thanks,

Razor
 
Dear Razor
In the query that runs your report, change from design
view to SQL view and in the select statement part of the
SQL you can change the field name to what you like by
having syntax like the example below.

SELECT MyTable.ReportClient AS
NewFieldName,MyTable.NextField,etc
From MyTable
WHERE...

HTH

Paul
 
Back
Top