Re: Ridding myself of "You are about to add n records to a New Table"
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Fri, 4 Nov 2005 23:08:16 +0800
Another approach is:
dbEngine(0)(0).Execute strSql, dbFailOnError
That has the advantage of notifying you if something goes wrong, but not if
the action completes successfully.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"xRoachx" <xRoachx@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:024ABA6C-FB40-4FED-9547-9E94996DE064@xxxxxxxxxxxxxxxx
> Before your SQL execution, enter the line:
>
> DoCmd.SetWarnings False
>
> Before you exit the function:
>
> DoCmd.SetWarnings True
>
> Always make sure to turn the warnings back on.
>
> "Neily" wrote:
>
>> Hi,
>>
>> I've got a bit of VB code that runs a few DoCmd's. It currently runs an
>> SQL
>> that takes a section of data from one table and writes it to a new table.
>> When this section runs, it the default message warning you what you are
>> about
>> to do comes up.
>>
>> Is there any way, programattically or otherwise to stop this message
>> coming
>> up so that the code runs straight through with no messageboxes?
>>
>> Ta..
.
- Follow-Ups:
- Re: Ridding myself of "You are about to add n records to a New Table"
- From: David C. Holley
- Re: Ridding myself of "You are about to add n records to a New Table"
- Prev by Date: Re: Entering a criteria for a Report based on a variable
- Next by Date: Re: Backup (or Export) all Code at Once
- Previous by thread: Re: Entering a criteria for a Report based on a variable
- Next by thread: Re: Ridding myself of "You are about to add n records to a New Table"
- Index(es):