A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Append Query Error



 
 
Thread Tools Display Modes
  #1  
Old October 25th, 2007, 05:41 PM posted to microsoft.public.access.queries
kalyhan
external usenet poster
 
Posts: 18
Default Append Query Error

Hi Everyone!

I am trying to run an append query, but it errors out at "Duplicate output
destination 'EmployeeID'."

I have checked (and re-checked), I see no duplicate fields except in the
original tables (where the info is pulled from for query).

For this query, I selected "EmployeeID" from the main table, amoungst other
fields and then a few fields from another table (but not "EmployeeID" from
the 2nd table).

I set the append query to send the data to my "InActive Employees" table
(within the same database), and I checked this too for duplicate fields.

What am I doing wrong?? If I simply view the results of my query, the data
shows just fine - I only have issues when I try to append.

If you need more specific info, please let me know.

Thank you for any assistance.

Best Regards,
Karen
  #2  
Old October 25th, 2007, 07:20 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Append Query Error

Show us the SQL. Open the query in design view. Next go to View, SQL View
and copy and past it here. Information on primary keys and relationships
would be a nice touch too.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

"kalyhan" wrote:

Hi Everyone!

I am trying to run an append query, but it errors out at "Duplicate output
destination 'EmployeeID'."

I have checked (and re-checked), I see no duplicate fields except in the
original tables (where the info is pulled from for query).

For this query, I selected "EmployeeID" from the main table, amoungst other
fields and then a few fields from another table (but not "EmployeeID" from
the 2nd table).

I set the append query to send the data to my "InActive Employees" table
(within the same database), and I checked this too for duplicate fields.

What am I doing wrong?? If I simply view the results of my query, the data
shows just fine - I only have issues when I try to append.

If you need more specific info, please let me know.

Thank you for any assistance.

Best Regards,
Karen

  #3  
Old October 25th, 2007, 07:24 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 2,364
Default Append Query Error

Post the SQL statement of your query.
View: SQL
Copy and paste to the newsgroup.



'================================================= ===
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'================================================= ===


kalyhan wrote:
Hi Everyone!

I am trying to run an append query, but it errors out at "Duplicate output
destination 'EmployeeID'."

I have checked (and re-checked), I see no duplicate fields except in the
original tables (where the info is pulled from for query).

For this query, I selected "EmployeeID" from the main table, amoungst other
fields and then a few fields from another table (but not "EmployeeID" from
the 2nd table).

I set the append query to send the data to my "InActive Employees" table
(within the same database), and I checked this too for duplicate fields.

What am I doing wrong?? If I simply view the results of my query, the data
shows just fine - I only have issues when I try to append.

If you need more specific info, please let me know.

Thank you for any assistance.

Best Regards,
Karen

  #4  
Old October 25th, 2007, 07:42 PM posted to microsoft.public.access.queries
kalyhan
external usenet poster
 
Posts: 18
Default Append Query Error

Thanks for relying so quickly! Here's my SQL. Let me know if you need
anything else.

INSERT INTO [InActive Employees] ( EmployeeID, [Employee Name], [Hire Date],
[Assigned Dept], [End Date], Comments, Inactive, CourseID, RequiredDate,
Trainer, DateTrainComp, Area, [Miscellaneous Training] )
SELECT Employees.EmployeeID, Employees.[Employee Name], Employees.[Hire
Date], Employees.[Assigned Dept], Employees.[End Date], Employees.Comments,
Employees.Inactive, [Assigned Training].CourseID, [Assigned
Training].RequiredDate, [Assigned Training].Trainer, [Assigned
Training].DateTrainComp, [Assigned Training].Area, [Assigned
Training].[Miscellaneous Training], *
FROM Employees RIGHT JOIN [Assigned Training] ON Employees.EmployeeID =
[Assigned Training].EmployeeID
WHERE (((Employees.Inactive)=Yes))
ORDER BY Employees.[Employee Name];

"John Spencer" wrote:

Post the SQL statement of your query.
View: SQL
Copy and paste to the newsgroup.



'================================================= ===
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'================================================= ===


kalyhan wrote:
Hi Everyone!

I am trying to run an append query, but it errors out at "Duplicate output
destination 'EmployeeID'."

I have checked (and re-checked), I see no duplicate fields except in the
original tables (where the info is pulled from for query).

For this query, I selected "EmployeeID" from the main table, amoungst other
fields and then a few fields from another table (but not "EmployeeID" from
the 2nd table).

I set the append query to send the data to my "InActive Employees" table
(within the same database), and I checked this too for duplicate fields.

What am I doing wrong?? If I simply view the results of my query, the data
shows just fine - I only have issues when I try to append.

If you need more specific info, please let me know.

Thank you for any assistance.

Best Regards,
Karen


  #5  
Old October 25th, 2007, 07:49 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 2,364
Default Append Query Error


I suspect that the problem is in this bit.

See the Asterisk (*). DELETE IT!!!!

, [Assigned Training].[Miscellaneous Training], *

INSERT INTO [InActive Employees] ( EmployeeID, [Employee Name]
, [Hire Date],
[Assigned Dept], [End Date], Comments, Inactive, CourseID, RequiredDate,
Trainer, DateTrainComp, Area, [Miscellaneous Training] )
SELECT Employees.EmployeeID, Employees.[Employee Name]
, Employees.[Hire Date], Employees.[Assigned Dept]
, Employees.[End Date], Employees.Comments,
Employees.Inactive, [Assigned Training].CourseID
, [Assigned Training].RequiredDate, [Assigned Training].Trainer,
[Assigned Training].DateTrainComp, [Assigned Training].Area
, [Assigned Training].[Miscellaneous Training]
FROM Employees RIGHT JOIN [Assigned Training] ON Employees.EmployeeID =
[Assigned Training].EmployeeID
WHERE (((Employees.Inactive)=Yes))
ORDER BY Employees.[Employee Name];

'================================================= ===
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'================================================= ===


kalyhan wrote:
Thanks for relying so quickly! Here's my SQL. Let me know if you need
anything else.

INSERT INTO [InActive Employees] ( EmployeeID, [Employee Name], [Hire Date],
[Assigned Dept], [End Date], Comments, Inactive, CourseID, RequiredDate,
Trainer, DateTrainComp, Area, [Miscellaneous Training] )
SELECT Employees.EmployeeID, Employees.[Employee Name], Employees.[Hire
Date], Employees.[Assigned Dept], Employees.[End Date], Employees.Comments,
Employees.Inactive, [Assigned Training].CourseID, [Assigned
Training].RequiredDate, [Assigned Training].Trainer, [Assigned
Training].DateTrainComp, [Assigned Training].Area, [Assigned
Training].[Miscellaneous Training], *
FROM Employees RIGHT JOIN [Assigned Training] ON Employees.EmployeeID =
[Assigned Training].EmployeeID
WHERE (((Employees.Inactive)=Yes))
ORDER BY Employees.[Employee Name];

"John Spencer" wrote:

Post the SQL statement of your query.
View: SQL
Copy and paste to the newsgroup.



'================================================= ===
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'================================================= ===


kalyhan wrote:
Hi Everyone!

I am trying to run an append query, but it errors out at "Duplicate output
destination 'EmployeeID'."

I have checked (and re-checked), I see no duplicate fields except in the
original tables (where the info is pulled from for query).

For this query, I selected "EmployeeID" from the main table, amoungst other
fields and then a few fields from another table (but not "EmployeeID" from
the 2nd table).

I set the append query to send the data to my "InActive Employees" table
(within the same database), and I checked this too for duplicate fields.

What am I doing wrong?? If I simply view the results of my query, the data
shows just fine - I only have issues when I try to append.

If you need more specific info, please let me know.

Thank you for any assistance.

Best Regards,
Karen

  #6  
Old October 25th, 2007, 08:26 PM posted to microsoft.public.access.queries
kalyhan
external usenet poster
 
Posts: 18
Default Append Query Error

OK, I deleted the asterisk, tried saving the query and received the message
"Syntax error in INSERT INTO statement".

I wonder if I re-create the query. I did hit the asterisk when first
setting up the query. I deleted it from the design setup, then chose the
seperate fields instead.
Maybe this confused the query? I don't know how "sensitive" they are.

Karen

"John Spencer" wrote:


I suspect that the problem is in this bit.

See the Asterisk (*). DELETE IT!!!!

, [Assigned Training].[Miscellaneous Training], *

INSERT INTO [InActive Employees] ( EmployeeID, [Employee Name]
, [Hire Date],
[Assigned Dept], [End Date], Comments, Inactive, CourseID, RequiredDate,
Trainer, DateTrainComp, Area, [Miscellaneous Training] )
SELECT Employees.EmployeeID, Employees.[Employee Name]
, Employees.[Hire Date], Employees.[Assigned Dept]
, Employees.[End Date], Employees.Comments,
Employees.Inactive, [Assigned Training].CourseID
, [Assigned Training].RequiredDate, [Assigned Training].Trainer,
[Assigned Training].DateTrainComp, [Assigned Training].Area
, [Assigned Training].[Miscellaneous Training]
FROM Employees RIGHT JOIN [Assigned Training] ON Employees.EmployeeID =
[Assigned Training].EmployeeID
WHERE (((Employees.Inactive)=Yes))
ORDER BY Employees.[Employee Name];

'================================================= ===
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'================================================= ===


kalyhan wrote:
Thanks for relying so quickly! Here's my SQL. Let me know if you need
anything else.

INSERT INTO [InActive Employees] ( EmployeeID, [Employee Name], [Hire Date],
[Assigned Dept], [End Date], Comments, Inactive, CourseID, RequiredDate,
Trainer, DateTrainComp, Area, [Miscellaneous Training] )
SELECT Employees.EmployeeID, Employees.[Employee Name], Employees.[Hire
Date], Employees.[Assigned Dept], Employees.[End Date], Employees.Comments,
Employees.Inactive, [Assigned Training].CourseID, [Assigned
Training].RequiredDate, [Assigned Training].Trainer, [Assigned
Training].DateTrainComp, [Assigned Training].Area, [Assigned
Training].[Miscellaneous Training], *
FROM Employees RIGHT JOIN [Assigned Training] ON Employees.EmployeeID =
[Assigned Training].EmployeeID
WHERE (((Employees.Inactive)=Yes))
ORDER BY Employees.[Employee Name];

"John Spencer" wrote:

Post the SQL statement of your query.
View: SQL
Copy and paste to the newsgroup.



'================================================= ===
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'================================================= ===


kalyhan wrote:
Hi Everyone!

I am trying to run an append query, but it errors out at "Duplicate output
destination 'EmployeeID'."

I have checked (and re-checked), I see no duplicate fields except in the
original tables (where the info is pulled from for query).

For this query, I selected "EmployeeID" from the main table, amoungst other
fields and then a few fields from another table (but not "EmployeeID" from
the 2nd table).

I set the append query to send the data to my "InActive Employees" table
(within the same database), and I checked this too for duplicate fields.

What am I doing wrong?? If I simply view the results of my query, the data
shows just fine - I only have issues when I try to append.

If you need more specific info, please let me know.

Thank you for any assistance.

Best Regards,
Karen


  #7  
Old October 25th, 2007, 11:05 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 2,364
Default Append Query Error

Did you delete the comma before the asterisk also?

Unless I am missing something the following should work.
INSERT INTO [InActive Employees]
( EmployeeID
, [Employee Name]
, [Hire Date]
, [Assigned Dept]
, [End Date]
, Comments
, Inactive
, CourseID
, RequiredDate
, Trainer
, DateTrainComp
, Area
, [Miscellaneous Training] )
SELECT Employees.EmployeeID
, Employees.[Employee Name]
, Employees.[Hire Date]
, Employees.[Assigned Dept]
, Employees.[End Date]
, Employees.Comments
, Employees.Inactive
, [Assigned Training].CourseID
, [Assigned Training].RequiredDate
, [Assigned Training].Trainer
, [Assigned Training].DateTrainComp
, [Assigned Training].Area
, [Assigned Training].[Miscellaneous Training]
FROM Employees RIGHT JOIN [Assigned Training]
ON Employees.EmployeeID =[Assigned Training].EmployeeID
WHERE (((Employees.Inactive)=Yes))
ORDER BY Employees.[Employee Name];

Now, let me ask why are you doing this. You already have the employees
marked as inactive in the employees table and can screen them out
anytime you need to using the employees.inactive field.

'================================================= ===
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'================================================= ===


kalyhan wrote:
OK, I deleted the asterisk, tried saving the query and received the message
"Syntax error in INSERT INTO statement".

I wonder if I re-create the query. I did hit the asterisk when first
setting up the query. I deleted it from the design setup, then chose the
seperate fields instead.
Maybe this confused the query? I don't know how "sensitive" they are.

Karen

"John Spencer" wrote:

I suspect that the problem is in this bit.

See the Asterisk (*). DELETE IT!!!!

, [Assigned Training].[Miscellaneous Training], *

INSERT INTO [InActive Employees] ( EmployeeID, [Employee Name]
, [Hire Date],
[Assigned Dept], [End Date], Comments, Inactive, CourseID, RequiredDate,
Trainer, DateTrainComp, Area, [Miscellaneous Training] )
SELECT Employees.EmployeeID, Employees.[Employee Name]
, Employees.[Hire Date], Employees.[Assigned Dept]
, Employees.[End Date], Employees.Comments,
Employees.Inactive, [Assigned Training].CourseID
, [Assigned Training].RequiredDate, [Assigned Training].Trainer,
[Assigned Training].DateTrainComp, [Assigned Training].Area
, [Assigned Training].[Miscellaneous Training]
FROM Employees RIGHT JOIN [Assigned Training] ON Employees.EmployeeID =
[Assigned Training].EmployeeID
WHERE (((Employees.Inactive)=Yes))
ORDER BY Employees.[Employee Name];

'================================================= ===
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'================================================= ===


kalyhan wrote:
Thanks for relying so quickly! Here's my SQL. Let me know if you need
anything else.

INSERT INTO [InActive Employees] ( EmployeeID, [Employee Name], [Hire Date],
[Assigned Dept], [End Date], Comments, Inactive, CourseID, RequiredDate,
Trainer, DateTrainComp, Area, [Miscellaneous Training] )
SELECT Employees.EmployeeID, Employees.[Employee Name], Employees.[Hire
Date], Employees.[Assigned Dept], Employees.[End Date], Employees.Comments,
Employees.Inactive, [Assigned Training].CourseID, [Assigned
Training].RequiredDate, [Assigned Training].Trainer, [Assigned
Training].DateTrainComp, [Assigned Training].Area, [Assigned
Training].[Miscellaneous Training], *
FROM Employees RIGHT JOIN [Assigned Training] ON Employees.EmployeeID =
[Assigned Training].EmployeeID
WHERE (((Employees.Inactive)=Yes))
ORDER BY Employees.[Employee Name];

"John Spencer" wrote:

Post the SQL statement of your query.
View: SQL
Copy and paste to the newsgroup.



'================================================= ===
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'================================================= ===


kalyhan wrote:
Hi Everyone!

I am trying to run an append query, but it errors out at "Duplicate output
destination 'EmployeeID'."

I have checked (and re-checked), I see no duplicate fields except in the
original tables (where the info is pulled from for query).

For this query, I selected "EmployeeID" from the main table, amoungst other
fields and then a few fields from another table (but not "EmployeeID" from
the 2nd table).

I set the append query to send the data to my "InActive Employees" table
(within the same database), and I checked this too for duplicate fields.

What am I doing wrong?? If I simply view the results of my query, the data
shows just fine - I only have issues when I try to append.

If you need more specific info, please let me know.

Thank you for any assistance.

Best Regards,
Karen

  #8  
Old October 26th, 2007, 12:43 PM posted to microsoft.public.access.queries
kalyhan
external usenet poster
 
Posts: 18
Default Append Query Error

Thanks John - I did forget to remove the comma. I ran the query and it
"copied" the files to the InActive Employees table. I thought by doing so,
the user would no longer see these records when they were updating other
forms. But this is not the case. The old records still show up. Was I
assuming incorrectly?

I really didn't want to "copy" the records. I set them as inactive, hoping
they would no longer show when the user updates other forms. I've seen
discussions on setting things as inactive, but I have yet to see how to
prevent those records from
showing up under forms. If you are aware of where this is discussed
specifically,
perhaps you can lead me there??

Thank you so much for your assistance.

Karen


"John Spencer" wrote:

Did you delete the comma before the asterisk also?

Unless I am missing something the following should work.
INSERT INTO [InActive Employees]
( EmployeeID
, [Employee Name]
, [Hire Date]
, [Assigned Dept]
, [End Date]
, Comments
, Inactive
, CourseID
, RequiredDate
, Trainer
, DateTrainComp
, Area
, [Miscellaneous Training] )
SELECT Employees.EmployeeID
, Employees.[Employee Name]
, Employees.[Hire Date]
, Employees.[Assigned Dept]
, Employees.[End Date]
, Employees.Comments
, Employees.Inactive
, [Assigned Training].CourseID
, [Assigned Training].RequiredDate
, [Assigned Training].Trainer
, [Assigned Training].DateTrainComp
, [Assigned Training].Area
, [Assigned Training].[Miscellaneous Training]
FROM Employees RIGHT JOIN [Assigned Training]
ON Employees.EmployeeID =[Assigned Training].EmployeeID
WHERE (((Employees.Inactive)=Yes))
ORDER BY Employees.[Employee Name];

Now, let me ask why are you doing this. You already have the employees
marked as inactive in the employees table and can screen them out
anytime you need to using the employees.inactive field.

'================================================= ===
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'================================================= ===


kalyhan wrote:
OK, I deleted the asterisk, tried saving the query and received the message
"Syntax error in INSERT INTO statement".

I wonder if I re-create the query. I did hit the asterisk when first
setting up the query. I deleted it from the design setup, then chose the
seperate fields instead.
Maybe this confused the query? I don't know how "sensitive" they are.

Karen

"John Spencer" wrote:

I suspect that the problem is in this bit.

See the Asterisk (*). DELETE IT!!!!

, [Assigned Training].[Miscellaneous Training], *

INSERT INTO [InActive Employees] ( EmployeeID, [Employee Name]
, [Hire Date],
[Assigned Dept], [End Date], Comments, Inactive, CourseID, RequiredDate,
Trainer, DateTrainComp, Area, [Miscellaneous Training] )
SELECT Employees.EmployeeID, Employees.[Employee Name]
, Employees.[Hire Date], Employees.[Assigned Dept]
, Employees.[End Date], Employees.Comments,
Employees.Inactive, [Assigned Training].CourseID
, [Assigned Training].RequiredDate, [Assigned Training].Trainer,
[Assigned Training].DateTrainComp, [Assigned Training].Area
, [Assigned Training].[Miscellaneous Training]
FROM Employees RIGHT JOIN [Assigned Training] ON Employees.EmployeeID =
[Assigned Training].EmployeeID
WHERE (((Employees.Inactive)=Yes))
ORDER BY Employees.[Employee Name];

'================================================= ===
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'================================================= ===


kalyhan wrote:
Thanks for relying so quickly! Here's my SQL. Let me know if you need
anything else.

INSERT INTO [InActive Employees] ( EmployeeID, [Employee Name], [Hire Date],
[Assigned Dept], [End Date], Comments, Inactive, CourseID, RequiredDate,
Trainer, DateTrainComp, Area, [Miscellaneous Training] )
SELECT Employees.EmployeeID, Employees.[Employee Name], Employees.[Hire
Date], Employees.[Assigned Dept], Employees.[End Date], Employees.Comments,
Employees.Inactive, [Assigned Training].CourseID, [Assigned
Training].RequiredDate, [Assigned Training].Trainer, [Assigned
Training].DateTrainComp, [Assigned Training].Area, [Assigned
Training].[Miscellaneous Training], *
FROM Employees RIGHT JOIN [Assigned Training] ON Employees.EmployeeID =
[Assigned Training].EmployeeID
WHERE (((Employees.Inactive)=Yes))
ORDER BY Employees.[Employee Name];

"John Spencer" wrote:

Post the SQL statement of your query.
View: SQL
Copy and paste to the newsgroup.



'================================================= ===
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'================================================= ===


kalyhan wrote:
Hi Everyone!

I am trying to run an append query, but it errors out at "Duplicate output
destination 'EmployeeID'."

I have checked (and re-checked), I see no duplicate fields except in the
original tables (where the info is pulled from for query).

For this query, I selected "EmployeeID" from the main table, amoungst other
fields and then a few fields from another table (but not "EmployeeID" from
the 2nd table).

I set the append query to send the data to my "InActive Employees" table
(within the same database), and I checked this too for duplicate fields.

What am I doing wrong?? If I simply view the results of my query, the data
shows just fine - I only have issues when I try to append.

If you need more specific info, please let me know.

Thank you for any assistance.

Best Regards,
Karen


  #9  
Old October 26th, 2007, 02:11 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Append Query Error

You copied the records to the new table. You did not delete them from the
existing table. You can do that by using a DELETE query after you have
executed the query to copy the records over and have CHECKED that you were
successful. If you delete the inactive employees you will have problems if
there are any other records in other tables that reference the records of
inactive employees. For instance, if you were tracking sales by employees
then you really would need to keep the inactive employees records around.

Use the Inactive field to limit the records that are being displayed. In
queries that are used for the record sources of your forms (and reports),
add the INACTIVE field and set criteria against the field to FALSE

Field: Inactive
Criteria: FALSE

Another way to handle this is to build a one table query against the
employees table. Name the query qActiveEmployees and use it whereever you
need to get only the active employees. Use the full table when you need to
get any employee (active or inactive).

SELECT *
FROM Employees
WHERE Inactive = False

Then you have all employees in the same table and if you need to look at
both active and inactive employees you use the table. If you need to look
at only active employees you use the query. In Access, queries can be used
as if they were tables in almost all cases.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"kalyhan" wrote in message
...
Thanks John - I did forget to remove the comma. I ran the query and it
"copied" the files to the InActive Employees table. I thought by doing
so,
the user would no longer see these records when they were updating other
forms. But this is not the case. The old records still show up. Was I
assuming incorrectly?

I really didn't want to "copy" the records. I set them as inactive,
hoping
they would no longer show when the user updates other forms. I've seen
discussions on setting things as inactive, but I have yet to see how to
prevent those records from
showing up under forms. If you are aware of where this is discussed
specifically,
perhaps you can lead me there??

Thank you so much for your assistance.

Karen




  #10  
Old October 26th, 2007, 03:06 PM posted to microsoft.public.access.queries
kalyhan
external usenet poster
 
Posts: 18
Default Append Query Error

I created a query and set the criteria to pull all FALSE Inactive records
from the Employee Table per your suggestion and then set the form off this
new query.
It gave me exactly what I wanted. The user can now freely update active
empoyees without having to view all obsolete records.

I deleted my append query - it was not exactly what I needed. All records can
stay in the Employee Table - this presents no problems that I know of.

You have been a tremendous help. THANK YOU!
Karen

"John Spencer" wrote:

You copied the records to the new table. You did not delete them from the
existing table. You can do that by using a DELETE query after you have
executed the query to copy the records over and have CHECKED that you were
successful. If you delete the inactive employees you will have problems if
there are any other records in other tables that reference the records of
inactive employees. For instance, if you were tracking sales by employees
then you really would need to keep the inactive employees records around.

Use the Inactive field to limit the records that are being displayed. In
queries that are used for the record sources of your forms (and reports),
add the INACTIVE field and set criteria against the field to FALSE

Field: Inactive
Criteria: FALSE

Another way to handle this is to build a one table query against the
employees table. Name the query qActiveEmployees and use it whereever you
need to get only the active employees. Use the full table when you need to
get any employee (active or inactive).

SELECT *
FROM Employees
WHERE Inactive = False

Then you have all employees in the same table and if you need to look at
both active and inactive employees you use the table. If you need to look
at only active employees you use the query. In Access, queries can be used
as if they were tables in almost all cases.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"kalyhan" wrote in message
...
Thanks John - I did forget to remove the comma. I ran the query and it
"copied" the files to the InActive Employees table. I thought by doing
so,
the user would no longer see these records when they were updating other
forms. But this is not the case. The old records still show up. Was I
assuming incorrectly?

I really didn't want to "copy" the records. I set them as inactive,
hoping
they would no longer show when the user updates other forms. I've seen
discussions on setting things as inactive, but I have yet to see how to
prevent those records from
showing up under forms. If you are aware of where this is discussed
specifically,
perhaps you can lead me there??

Thank you so much for your assistance.

Karen





 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:05 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.