Swap field names in code

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
 
P

Paul Falla

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top