form based on query does not auto-fill parents

delikedi

Registered User.
Local time
Today, 02:48
Joined
Apr 4, 2012
Messages
87
Hello. I'm badly stuck in a form that is based on a query. In simple terms, The query links 3 tables, in a very regular one to many style:

Foods--->Fruits--->Berries

In query datasheet, when I enter the ID of Foods in the foreign key field of fruits, the data from the Foods table are automatically filled in. I can even enter the ID of Fruits in the forein key fields of berries table and both fruits and foods data are filled in, I just need to add data for different berries.

Why can't I do the exact same thing in a form based on this query? The form assigns a new autonumber as primary key in Fruits table and rejects the foreign key I provide, thus giving error 3341 (primary-foreign should match error).
 
hi,

Structre of your tables and linking is not clear from your statement. i would suggest you to send the same of db itself for a clear solution
 

Users who are viewing this thread

Back
Top Bottom