Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter Append quesry

Status
Not open for further replies.

dixxy

Technical User
Mar 4, 2003
220
CA
Hi everyone,

I would like to know how i could filter an append query based on a current record. Here is the setup: I haqve a form (inventory) with a sub form (purchase orders). I would like my users to be able to scroll through the form, and when they find the item the want from the inventory, to just click the 'add to purchase order' button and only that record woulg get copied to the purchase order table, not the entire inventory.

How could i limit this query? The criteria has to be 'current record'. How can i fomulate this?


Thanks,

Sylvain
 
If the Add to purchase order button is on each line, you will find that it will return the ID of the current line, so something on the lines of:

[tt]strSQL="INSERT INTO Purchase SELECT Inventory.* FROM Inventory WHERE ID=" & Me.ID[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top