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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query to databases with parameters

Status
Not open for further replies.

djj55

Programmer
Feb 6, 2006
1,761
US
Hello, In Access, I have linked tables from two databases.
What I want is an append query like:
Code:
INSERT INTO db[red]1[/red]_Table1 (Field1, Field2, ..)
SELECT Field1, Field2, .. FROM db[red]2[/red]_Table1
WHERE Field1 = x AND Field2 = y
where x and y are defined on a form.

I know how to create a query with parameters x and y but this prompts for the values. I just want to use the values entered on the form.

If you can point me to help it would be appreciated.

Thanks
djj
 
WHERE Field1 = [Forms]![mainform]![x] AND Field2 = [Forms]![mainform]![y]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thank you, I will use the excuse that it is Friday.
djj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top