Access Append query

R

Richard John

I'm having a slight problem with an append query in MS Access 2000. I am modifying the querydef each
time I use it, in code :

sFinyear_1 = [Forms]![Tracking report options]![finyear_1]
sFinyear_2 = [Forms]![Tracking report options]![finyear_2]
SQL = "INSERT INTO t_monthly_analysis_crosstab_data ( Ndx, Description, "
SQL = SQL & "[" & sFinyear_1 & "], "
SQL = SQL & "[" & sFinyear_2 & "], "
.....

The resolved SQL fragment shown below is where the problem is occuring:

INSERT INTO t_monthly_analysis_crosstab_data ( Ndx, Description, [2005/06], [2006/07],.....)

The financial year fields expressed as "2005/06", "2006/07" etc.. are being converted to "2006/7"
and "2007/8" then throwing up a circular reference error. I'm having to fix the problem in the query
grid by inserting a leading "0" (2005/6 to 2005/06) after which it runs. I am automating this and
need a solution. Can someone help please.

Thanks
 

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