How create records from query w/ joins?

F

Fjordur

Hi,
well I guess the short answer is "you can't" :)
OK I've got a table A whose records can be linked, or not, to records in
table B and/or C.
I have a single form to show and edit records of A that have no matching
records either in table B or C. It's based on the following query which of
course has left joins:
SELECT A.*
FROM (A LEFT JOIN ON A.ID_A = .ID_A)
LEFT JOIN [C] ON A.ID_A = [C].ID_A
WHERE ((([C].ID_C) Is Null) AND ((.ID_B) Is Null));
The problem is I can't add records from this form. I take it this has to do
with the join, right?

Then how do I deal with this problem? I don't like the idea of having a
button that says "add a record" and goes to another form. Suggestions?
 
M

Michel Walsh

Hi,


You should be able. Well, try Northwind:


SELECT DISTINCTROW Employees.*
FROM Employees LEFT JOIN Customers ON Employees.LastName =
Customers.CompanyName
WHERE (((Customers.CompanyName) Is Null));



sure, you will note that I innocently added DISTINCTROW. :)


Hoping it may help,
Vanderghast, Access MVP
 
F

Fjordur

Michel Walsh said:
SELECT DISTINCTROW Employees.*
FROM Employees LEFT JOIN Customers ON Employees.LastName =
Customers.CompanyName
WHERE (((Customers.CompanyName) Is Null));
sure, you will note that I innocently added DISTINCTROW. :)
Well, sure, but still, I'm glad you stressed this!!
I'll have to work on the help page for ALL, DISTINCT, DISTINCTROW, TOP
Predicates
Thanks,
 

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