Wrtting to two different Tables thorugh one Form

G

Guest

Hi,
I have two tables - one is Header information kind of stuff (ID Number,
Date, Location, etc.) The second table is information that is related to the
header and the anchor field is the ID Number same as the first table.

I've created two Queries for writing to these tables. Now I want to create
a single Form to write through these Queries to their respective data bases.
Creating two different Forms to do this is not a problem but that would be
kind of a clunky way to do it.

I tried to create one Query that would combine both tables but I can't get
it done - I always get the same notification that the records are not
updateable or read only or a host of other confusing messages. If I build a
single Query then my Form problem would go away.

Every attempt that I've made to have my Form link to two different Queries
or Tables ends with the infamous "#Name?" being displayed in all of the
Fields in one of the two Tables.

Sure could use some guidance on this one. I'm beginnig to think there is a
problem with my installation - surely its not me! :)

Thanks,
Larry
 
R

Rick Brandt

Larry said:
Hi,
I have two tables - one is Header information kind of stuff (ID Number,
Date, Location, etc.) The second table is information that is related to the
header and the anchor field is the ID Number same as the first table.

I've created two Queries for writing to these tables. Now I want to create
a single Form to write through these Queries to their respective data bases.
Creating two different Forms to do this is not a problem but that would be
kind of a clunky way to do it.

I tried to create one Query that would combine both tables but I can't get
it done - I always get the same notification that the records are not
updateable or read only or a host of other confusing messages. If I build a
single Query then my Form problem would go away.

Every attempt that I've made to have my Form link to two different Queries
or Tables ends with the infamous "#Name?" being displayed in all of the
Fields in one of the two Tables.

Sure could use some guidance on this one. I'm beginnig to think there is a
problem with my installation - surely its not me! :)

Best solution is a form with a subform.
 
G

Guest

I agree with Rick's answer. If by "anchor field" you mean primary key, make
sure that IDNumber is the PK only in the header table. In the other table it
needs to be the foreign key. A relationship between two primary key fields
can only be one-to-one.
 

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