M
Mike
I have a table with data for different months of the year, eg.:
JanDebit, JanCredit, JanAdvance, JanTotal,
FebDebit, FebCredit, FebAdvance, FebTotal,
MarDebit, MarCredit, MarAdvance, MarTotal, and so on...
I would like to create a query which could retrieve neccessary fields
depending on the input parameters.
For example:
On my form I type "2" (means "February") and I get the following query:
SELECT MyTable.FebDebit As Debit, MyTable.FebCredit As Credit,
MyTable.FebAdvance As Advance, MyTable.FebTotal As Total
FROM MyTable
If on my form I type "3" (means "March") I should get the following:
SELECT MyTable.MarDebit As Debit, MyTable.MarCredit As Credit,
MyTable.MarAdvance As Advance, MyTable.MarTotal As Total
FROM MyTable
(the first three letters of the field names are replaced)
Is it possible?
Thank you in advance for any tips!
JanDebit, JanCredit, JanAdvance, JanTotal,
FebDebit, FebCredit, FebAdvance, FebTotal,
MarDebit, MarCredit, MarAdvance, MarTotal, and so on...
I would like to create a query which could retrieve neccessary fields
depending on the input parameters.
For example:
On my form I type "2" (means "February") and I get the following query:
SELECT MyTable.FebDebit As Debit, MyTable.FebCredit As Credit,
MyTable.FebAdvance As Advance, MyTable.FebTotal As Total
FROM MyTable
If on my form I type "3" (means "March") I should get the following:
SELECT MyTable.MarDebit As Debit, MyTable.MarCredit As Credit,
MyTable.MarAdvance As Advance, MyTable.MarTotal As Total
FROM MyTable
(the first three letters of the field names are replaced)
Is it possible?
Thank you in advance for any tips!