Append Query Destination

A

Andy Bailey

Is there anyway to select where an append queries results end up?

I want to be able to copy a set of records into a form.

I have a project proposal database; each proposal has many sections
(mechanical, electrical etc) and each section has many line items. Many
proposals will be similar so it would be easier to use a prior proposal
section as a start point.

I have an append query that can select the relevant line items from a
particular section within a particular proposal but it always appends to the
same record, i.e the same proposal section.

Is there anyway to tell the query where to deposit its results? Ideally it
would be in the currently selected proposal section on my form from which the
query is run.

Any help appreciated; forgive my terminology - new to this game and lovin'
every challenge (apart from this one). I'm using Acess 2000
 
J

John Vinson

Is there anyway to select where an append queries results end up?

Of course. You specify the table into which the results are stored in
designing the query.
I want to be able to copy a set of records into a form.

Well... stop.

Data is NOT STORED IN FORMS.

A Form is a *window*, not a data storage repository. Data is stored in
Tables, and only in Tables. A Form can view the data in a table, or in
a query which selects data from one or more tables.
I have a project proposal database; each proposal has many sections
(mechanical, electrical etc) and each section has many line items. Many
proposals will be similar so it would be easier to use a prior proposal
section as a start point. ..
I have an append query that can select the relevant line items from a
particular section within a particular proposal but it always appends to the
same record, i.e the same proposal section.

Please open this query in SQL view and post the cryptic SQL text here.
You'll need to get away from the idea that you're appending data to a
Form - that's simply neither possible nor desirable. You'll append the
data to a table and then use the form to *view* and edit that data.

John W. Vinson[MVP]
 
A

Andy Bailey

Thanks for reply - as I said forgive my terminology.

SQL was:-

INSERT INTO tblProposalDetails ( OrderIndex, ItemNo, UnitPrice, Quantity,
Markup, ItemDetails, ProductID, Supply, PropSectID )
SELECT tblProposalDetails.OrderIndex, tblProposalDetails.ItemNo,
tblProposalDetails.UnitPrice, tblProposalDetails.Quantity,
tblProposalDetails.Markup, tblProposalDetails.ItemDetails,
tblProposalDetails.ProductID, tblProposalDetails.Supply,
tblProposalSections.PropSectID
FROM tblProposalMaster INNER JOIN (tblProposalSections INNER JOIN (tblSupply
RIGHT JOIN (tblProducts INNER JOIN tblProposalDetails ON
tblProducts.ProductID = tblProposalDetails.ProductID) ON tblSupply.SupplyID =
tblProposalDetails.Supply) ON tblProposalSections.PropSectID =
tblProposalDetails.PropSectID) ON tblProposalMaster.ProjectID =
tblProposalSections.ProjectID
WHERE (((tblProposalSections.PropSectID)=[Select Section Number]) AND
((tblProposalMaster.ProjectID)=[Select Proposal Number]))
ORDER BY tblProposalDetails.OrderIndex, tblProposalDetails.ItemNo;

By changing the last part of the SELECT "portion" from:-
tblProposalSections.PropSectID
to:-
[Forms]![frmProposal]![PropSectID] AS PropSectID

it now appends to my current proposal section, rather than where I lifted
the data from.

Andy
 

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