Group:  Microsoft Access ยป microsoft.public.access.modulesdaovba.ado
Thread: Automate make-table query

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Automate make-table query
"Pret" <p.bjorn[ at ]netzero.net> 13.09.2006 21:44:46
In order to use a table from a network server in one of my applications, I
was forced to construct a make-table query which translates the server
table's field names, and sorts and indexes the records into a more useful
format.

What I'd like to do now is to create a procedure which executes the
make-table query on start-up (new records are added to the server all the
time), and somehow avoids the dialog boxes which warn me that I'm about to
create X number of records and overwrite the existing table (prior update).

Can this be done with code?

Any suggestions appreciated.

Pret


Re: Automate make-table query
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_canada.com> 14.09.2006 12:54:39
While it's generally not considered a good idea to use make-table queries in
an application, the alternative (predefining the table, and having the data
append to that table) can have the same pop-ups, so it's kind of a moot
point...

If you're using RunSQL, put

DoCmd.SetWarnings False

before the RunSQL command, and

DoCmd.SetWarnings True

afterwards.

However, it's probably better to use the Execute method of the Database
object:

CurrentDb().Execute strSQL, dbFailOnError

The Execute method doesn't display pop-ups, and the dbFailOnError parameter
will cause a trappable error to be raised if something goes wrong with the
process.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Pret" <p.bjorn[ at ]netzero.net> wrote in message
news:%23kIv0651GHA.476[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text]
> In order to use a table from a network server in one of my applications, I
> was forced to construct a make-table query which translates the server
> table's field names, and sorts and indexes the records into a more useful
> format.
>
> What I'd like to do now is to create a procedure which executes the
> make-table query on start-up (new records are added to the server all the
> time), and somehow avoids the dialog boxes which warn me that I'm about to
> create X number of records and overwrite the existing table (prior
> update).
>
> Can this be done with code?
>
> Any suggestions appreciated.
>
> Pret
>
>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net