Field name changing on me!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I can NOT figure this one out!

I have 2 tables with the same field name (a memo field). The field name is
Risks (summry)

I create a simple append query which looks like this:

INSERT INTO Table2 ( [Risks (summry)] ) SELECT Table1.[Risks (summry)] FROM
Table1;

If I run the query without saving it, the query runs fine.
If I save the query (and exit it) then double click it, i get an error:

The INSERT INTO statement contains the following unknown field
name: 'Risks(summry)'. Make sure you have typed the name correctly, and try
the operation again.

I go back into designing the query, and low-and-behold, Access has REMOVED
THE SPACE between Risks and (summry) on me!!!!!!!!!!!!!!!!!!!!!!!!!!

Here is the query again (modified by Access)

INSERT INTO Table2 ( [Risks(summry)] ) SELECT Table1.[Risks (summry)] FROM
Table1;

*Notice how the space is gone in the first Risks(summry)

I have repeated this process over and over with the same results... Looked
online and found nothing - PLEASE HELP ME!

I am running Access 2002 w SP3

Thanks!
 
Since Table2 doesn't exist yet, Access is probably getting confused,
thinking that Risks(summry) is a function call.

Realistically, you shouldn't use special characters (nor spaces, for that
matter) in field names: it can lead to all sorts of unexpected problems.
 
I would recommend omitting the parenthesis from the field name and use
something like Risk_summary and then you want have the problem.

When you extract data using a query you can can the display in the design
view by entering this in the field row --
Risk (summary): Risk_summary
 
Back
Top