Help - Mental block - can't get this query right

G

Guest

Hello -

My current query does not allow me to add new records to my form:

SELECT tblCalls.CallID, tblCalls.Agent, tblCalls.CallerName, tblCalls.Phone,
tblCalls.CallDate, tblCalls.LoanType, tblCalls.NumbApps, tblCalls.Comment,
tblCallType.CallType, tblDeclaration.Declaration, tblDeclaration.DeclarationNo
FROM tblDeclaration INNER JOIN (tblCallType INNER JOIN ((tblCalls INNER JOIN
tblCallCallType ON tblCalls.CallID = tblCallCallType.CallID) INNER JOIN
tblCallDeclaration ON tblCalls.CallID = tblCallDeclaration.CallID) ON
tblCallType.CallTypeID = tblCallCallType.CallTypeID) ON
tblDeclaration.DeclarationID = tblCallDeclaration.DeclarationID;

This query also doesn't even include the tblStates, which is also needed.

I have the following tables:
[Main Table]
tblCalls
CallID
Agent
CallerName
Phone
CallDate

[Intersection table]
tblCallCallType
CallID
CallTypeID

tblCallType
CallTypeID
CallType

[Intersection table]
tblCallDeclaration
CallID
DeclarationID

tblDeclaration
DeclarationID
StateID
Declaration
DeclarationTextNo

tblStates
StateID
State

I can't punctuate Access queries, nor can I figure out the method of
"nesting" the joins. Can anyone help me on this?

I need a query that will return all of the rows in the table and allow me to
add more records.

Any help will be GREATLY appreciated. I am really stressing over this . . .
 
J

John Vinson

I need a query that will return all of the rows in the table and allow me to
add more records.

Ummm...

No. You don't.

It's rarely either necessary or appropriate to create one Grand Master
Query which does everything. Instead, use the powerful tools Access
provides, in particular the Subform.

Base a main form on Calls, with a Subform based on CallDeclarations;
use combo boxes for the various lookup fields.

See the Northwind sample database Orders form for a quite analogous
example.

John W. Vinson[MVP]
 

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

Similar Threads


Top