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!

Please Help With a 'make table query' 1

Status
Not open for further replies.
Nov 9, 2002
9
US
ok my questions here are working with make table queries

My first question is Can I make a form with 6 fields that a user can enter all the data in that is needed for a search and then hit a button to run a make table query?
If so how, i seem to have troulbe doing this with a make table query. I have got it to work before on just a reg. select query.

My second question is Is there any way to avoid the prompts that i get when i try to run a make table query?
I only run my query to create a table temporaliy, i really dont care if the data in the table is deleted. becasue the table is only based on the 5 fields i put in , the query is differnt ever time. I know what it is asking me for when i invoke a make table query but to my end users it seems intimidating, like a error message.. If any one knows a better way to set this up or how to get around the prompts please let me know.
 
There's no reason I can think of why a Make Table query couldn't get its parameters from a form, the same as a Select query. There's probably something wrong with the Make Table query's references to your form. If you want help with that, give us the form name, the names of the controls containing search criteria, and the SQL statement for your query.

You should be able to avoid prompts in either of two ways:

Method 1
Before running the MakeTable query, execute
DoCmd.SetWarnings False
and afterward
DoCmd.SetWarnings True
Be sure that the last statement gets executed at some point, because SetWarnings False turns off all kinds of warning messages, most of which aren't related to your application.

Method 2
Before running the MakeTable query, execute
blnOptCAQ = GetOption("Confirm Action Queries", True)
SetOption "Confirm Action Queries", False
and afterward
SetOption "Confirm Action Queries", blnOptCAQ
Again, be sure the last statement gets executed. Rick Sprague
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top