help

D

Darren Spooner

i have a query that i use the append info to another database, but in this
query there is a parameter. in my code i have DoCmd.OpenQuery "qryArchive",
acNormal, acEdit
DoCmd.RunCommand acCmdRun
i want the parameter to come from the form without me haveing to enter it
when the query ask me how do i do this??
 
K

Kelvin

Your code is running twice. The .OpenQuery function will run the query so
you don't need the second line. To get the criteria from the form, replace
your current criteria with.

Forms![nameOfForm]![nameOfTextBox]

Kelvin
 
D

Darren Spooner

thanks that worked

Kelvin said:
Your code is running twice. The .OpenQuery function will run the query so
you don't need the second line. To get the criteria from the form, replace
your current criteria with.

Forms![nameOfForm]![nameOfTextBox]

Kelvin

Darren Spooner said:
i have a query that i use the append info to another database, but in this
query there is a parameter. in my code i have DoCmd.OpenQuery "qryArchive",
acNormal, acEdit
DoCmd.RunCommand acCmdRun
i want the parameter to come from the form without me haveing to enter it
when the query ask me how do i do this??
 

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