I can create new records in a Query that have 2 tables

G

Guest

I need to solve this problem or I'm out of this company... I have a Query
with 1 table and another query join... and it work.. In the Query that is the
main table I have all the info that I need and in the other table I have some
pricing. I create the query that show the price base on the other table and
it work but I can't create new records... Please help
 
G

Guest

hi,
I don't think you can to that. run the query from design
mode. if a message appears in the status bar(lower left)
that the query is not updatable then you can't.
using code you could update many tables from data entered
into a form or perhaps run 2 update queries that update
two tables but you would have to create records 1 table at
a time.
why are you trying to create new records this way????
 
R

Rick B

Generally, if the two tables are one-to-one, you can create records in them
both from one form by including the "key" field from both tables and have
the "key" field in table2 updated by the "key" field from table1. For
example, I have an employee data table with an EmployeeNumber field. I have
a separate training table with an EmpNum field. After my cursor exits the
EmployeeNumber field in my "add" form, I have the EmpNum field updated with
the same value. This creates a matching record in the training table, even
if I do not choose to update any of the training fields until later.

One-To-Many relations would obvisoulsy involve adding a complete record to
the One sied before you add any records to the Many side.

Hope that helps.

Rick B
 

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