Query 1:n problem with Access and attached field

jan@BRU

Registered User.
Local time
Today, 07:00
Joined
Jul 18, 2007
Messages
39
Hello folks,

I do have the following problem, and - please do tell me- if I don't see the obvious.

I changed to Office 2007 and am busy changing an Access Application. In the course of that, I included some .gif files in an attachment field, which were hitherto stored in external files and loaded when required for display.

Say we have a company table (OPR_Operator) and a country table (GEO_Country). The country table has a country flag (Field GEO_Country.Flat) as attachment file.

If I create the following query:

SELECT OPR_Operator.OPID, OPR_Operator.Operator, OPR_Operator.Country, GEO_Country.CountryName, GEO_Country.Flag
FROM OPR_Operator INNER JOIN GEO_Country ON OPR_Operator.Country = GEO_Country.CountryCode;

I can edit existing records in a form without any problem. If I change e.g. the Country field in OPR_Operator, the new flag is displayed.

The problem occurs, when I want to add a new record. No way to do that. As soon as I enter the Country, I get the following error message:

The current field must match the join key '?' that serves as the one side of one-to-many relationship. Enter a record in the "one" side table with the desired key value, and then make the entry with the desired join field in the "many-only" table.


I appreciate that this reads like a beginner's error. The funny thing, though is, that I entered a country code, which DOES exist in the GEO_Country table.

Any help?

Very much appreciated.

Best,

Jan
 
On the properties of the form, is Allow Updates set to yes?
 
Update/Add is allowed

Yes, everything update, edit, add is allowed.

Mind you, the update of a pre-existing record does work. It just won't add new records...

Also, it doesn't seem to be a form issue, rather a query issue, as the same problem occurs, if the query is edited directly.



Thanks
 
Hello -- anyone any thoughts on this?
Thanks
 
Here I am, still with the same problem. Please help!

Many thanks

Jan
 

Users who are viewing this thread

Back
Top Bottom