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 > >
|