Re: Violence due to primary key problem in Append Query
- From: Steve Schapel <schapel@xxxxxxxxxxx>
- Date: Fri, 29 Sep 2006 06:44:12 +1200
Vicky,
It depends on how you are going about running the query.
If you are doing it via a macro using the OpenQuery action, you can precede it by a SetWarnings/No action.
If you are doing it via a VBA procedure, using the DoCmd.OpenQuery method or the DoCmd.RunSQL method, you have a couple of choices. One is to put
DoCmd.SetWarnings False
.... before the query in your code, and then
DoCmd.SetWarnings True
afterwards.
Another approach would be to use the CurrentDb.Execute method instead.
--
Steve Schapel, Microsoft Access MVP
Vicky wrote:
I created an append query to append the data to Update table. However, in the Update table I put the primary key on purpose in order to prevent duplicated record. Upon running, it shows the error message "Microsoft Access cannot append all the data in the Append query"..
Is there anyway to turn this message off and append the data automatically without show this messge panel?
Thank you
- Prev by Date: Re: Using radio button option group to set criteria for query
- Next by Date: Re: sum two seprate fields in query
- Previous by thread: Re: Violence due to primary key problem in Append Query
- Next by thread: Re: Wildcards
- Index(es):