Re: First append query

Tech-Archive recommends: Fix windows errors by optimizing your registry



Jack *** wrote:
> Hi all - Access 97
>
> Rather late in the day I have discovered (not surprisingly) a flaw in
> the table design of my first database (probably not the only one!)
>
> There is a table T_Tasks that tracks the progress of tax returns and
> preparation of accounts, with autonumber primary key ID_Tasks.
>
> Given that I would have to complete a tax return for each set of
> accounts I initially and erroneously figured that it would be
> sensible to use just the one record to track the progress of both.
> That assumption is flawed because more than one set of accounts might
> be relevant to one tax return, one set of accounts might be relevant
> to more than one tax return, and indeed some tax returns will not
> require any accounts (although that is only a minor objection).
> So I have decided to use a field "Task" to distinguish the tasks
> between accounts and tax returns (and indeed certain other tasks),
> and use query tables to match up accounts relevant to particular tax
> returns and monitor progress.
> The first step in this exercise will be to duplicate a large number of
> records currently residing in T_Tasks, append those records to
> T_Tasks, and then assign the Task_Type field of the new records to be
> "Accounts", leaving the original records dedicated solely to
> "Returns". There is already a Yes/No field "Accounts required?"
> within T_Tasks, and I tried to set up an append query that would
> create additional records in T_Tasks, as follows:
> INSERT INTO T_Tasks ( [Accs Req'd] )
> SELECT T_Tasks.[Accs Req'd]
> FROM T_Tasks
> WHERE (((T_Tasks.[Accs Req'd])=Yes));
>
> This bombed out with 0 records out of 808 appended, and error message
> that there were 808 validation rule violations. I clicked on Help at
> this point but I didn't understand the outcome, so it is back to the
> well of knowledge, I'm afraid. It did not help if I selected all of
> the fields in design view and left the criteria unchanged - same
> error.
> What next? ideas?

Did you change your Primary Key on the table? If not, then every record you
copy will be violating the Primary Key.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


.


Quantcast