PC Review


Reply
Thread Tools Rate Thread

Append query - Yes at the prompts

 
 
Adam
Guest
Posts: n/a
 
      22nd Jan 2007
Hi All,

I have a database which has started duplicating records to a reason
unknown to me. Whilst I investigate this issue I want users to still be
able to use the database.

As a temporary solution I have setup a 'Key' field in a table, and
setup an append query to append the records from one table to another,
and append to the 'Key' field a field which is unique. It is the
'AuditID' field and the 'QuestionID' consolidated into the one field.

On the table it is appending too the key field has been set Index with
no duplicates.

When i run the append query myself i have to press Yes at the prompt
which tells me it is validating an Index rule and would i like to run
the query for the remaining records anyway. When I select Yes it runs
as i wish, and brings in no duplicate records.

However I have a macro setup that runs this append query. I cannot see
a setting anywhere that will select Yes at the Index prompt screen.

Does anyone know how to get around this?

Many Thanks!!

Adam

 
Reply With Quote
 
 
 
 
=?Utf-8?B?U3R1bWFj?=
Guest
Posts: n/a
 
      22nd Jan 2007
In the line before the query is run on the macro you cn use the SetWarnings
command to turn the warnings off.

Hth

Stu

"Adam" wrote:

> Hi All,
>
> I have a database which has started duplicating records to a reason
> unknown to me. Whilst I investigate this issue I want users to still be
> able to use the database.
>
> As a temporary solution I have setup a 'Key' field in a table, and
> setup an append query to append the records from one table to another,
> and append to the 'Key' field a field which is unique. It is the
> 'AuditID' field and the 'QuestionID' consolidated into the one field.
>
> On the table it is appending too the key field has been set Index with
> no duplicates.
>
> When i run the append query myself i have to press Yes at the prompt
> which tells me it is validating an Index rule and would i like to run
> the query for the remaining records anyway. When I select Yes it runs
> as i wish, and brings in no duplicate records.
>
> However I have a macro setup that runs this append query. I cannot see
> a setting anywhere that will select Yes at the Index prompt screen.
>
> Does anyone know how to get around this?
>
> Many Thanks!!
>
> Adam
>
>

 
Reply With Quote
 
Adam
Guest
Posts: n/a
 
      22nd Jan 2007
Yes, but it selects No at the key prompt by default so turning off the
warnings doesnt help.

Stumac wrote:
> In the line before the query is run on the macro you cn use the SetWarnings
> command to turn the warnings off.
>
> Hth
>
> Stu
>
> "Adam" wrote:
>
> > Hi All,
> >
> > I have a database which has started duplicating records to a reason
> > unknown to me. Whilst I investigate this issue I want users to still be
> > able to use the database.
> >
> > As a temporary solution I have setup a 'Key' field in a table, and
> > setup an append query to append the records from one table to another,
> > and append to the 'Key' field a field which is unique. It is the
> > 'AuditID' field and the 'QuestionID' consolidated into the one field.
> >
> > On the table it is appending too the key field has been set Index with
> > no duplicates.
> >
> > When i run the append query myself i have to press Yes at the prompt
> > which tells me it is validating an Index rule and would i like to run
> > the query for the remaining records anyway. When I select Yes it runs
> > as i wish, and brings in no duplicate records.
> >
> > However I have a macro setup that runs this append query. I cannot see
> > a setting anywhere that will select Yes at the Index prompt screen.
> >
> > Does anyone know how to get around this?
> >
> > Many Thanks!!
> >
> > Adam
> >
> >


 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      22nd Jan 2007
On 22 Jan 2007 02:47:30 -0800, "Adam" <(E-Mail Removed)> wrote:

>Hi All,
>
>I have a database which has started duplicating records to a reason
>unknown to me. Whilst I investigate this issue I want users to still be
>able to use the database.
>
>As a temporary solution I have setup a 'Key' field in a table, and
>setup an append query to append the records from one table to another,
>and append to the 'Key' field a field which is unique. It is the
>'AuditID' field and the 'QuestionID' consolidated into the one field.


Be aware that you should *NOT* be creating a redundant composite field
for this purpose! You can - and probably should - create a unique
Index (either as a Primary Key or as a separate index) on the two
fields. It's not necessary to consolidate the fields into one; just
use the Indexes tool on the toolbar; type a unique name for the index
in the left column of the indexes window; and select the two
fieldnames on that line and the next line in the grid. Specify that
the index should be unique.

>On the table it is appending too the key field has been set Index with
>no duplicates.


Reasonable, but you do need the other index.

>When i run the append query myself i have to press Yes at the prompt
>which tells me it is validating an Index rule and would i like to run
>the query for the remaining records anyway. When I select Yes it runs
>as i wish, and brings in no duplicate records.


What is the actual error message you're getting???

>However I have a macro setup that runs this append query. I cannot see
>a setting anywhere that will select Yes at the Index prompt screen.
>
>Does anyone know how to get around this?


Correct the indexes so you don't get the warning, would be my first
step! Or, execute the query from VBA code, not from a macro, and
handle the error there.

John W. Vinson[MVP]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Append query to append lots of record with range input domibud Microsoft Access Queries 7 9th May 2008 02:26 AM
Coded Append Query doesn't append all info? Bumbino Microsoft Access Form Coding 1 26th Jan 2008 06:58 PM
Append Query in VBA - to append VBA variable values to Access tabl =?Utf-8?B?QWdlbnQgRGFnbmFtaXQ=?= Microsoft Access VBA Modules 4 1st Nov 2006 04:25 PM
Link CSV file created query append query to append data =?Utf-8?B?ZXNwYXJ6YW9uZQ==?= Microsoft Access Queries 2 5th Jul 2005 04:49 PM
Append Query... Can't Create a Unique Number to Append Vance Microsoft Access Queries 8 17th Dec 2003 11:18 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:57 PM.