xxx SQL Queries xxx

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an SQL Query which incorporates two tables by a Union. Is there a way I can create a command button on a form to write a new Table with this data that is stored in the query? I need it to always overwrite the table it's writing to. I'm new to this, so please go easy on me, thanks!
 
Hi

Simply inset button from toolbox, select Miscellaneous.RunQuery, and poin to
your query.


--
Arvi Laanemets
(When sending e-mail, use address (e-mail address removed))



bladelock said:
I have an SQL Query which incorporates two tables by a Union. Is there a
way I can create a command button on a form to write a new Table with this
data that is stored in the query? I need it to always overwrite the table
it's writing to. I'm new to this, so please go easy on me, thanks!
 
Hi

Create a query. In design view, set query type (from toolbar, or from Query
menu) to make table query. It's all.

Arvi Laanemets


bladelock said:
That doesn't answer the question. I want to TRANSFER the data from the
query, to a NEW TABLE with a command button on the form. Please read the
question, thanks!
 
Hi

bladelock said:
I appreciate your help, but I need this to be done with a command button
on a form.

So where is the problem? Create a union query in queries section. Set the
type for the query to Make-Table. Create a 'Run-Query' button, and point at
your make-table query when you are asked, which one you want to run. It's
all. In buttons On-click event will be a command line:
DoCmd.OpenQuery stDocName, acNormal, acEdit
which does the actual work


Arvi Laanemets
 
Back
Top