Link to home
Start Free TrialLog in
Avatar of Robert Berke
Robert BerkeFlag for United States of America

asked on

Duplicate output destination 'data' when using expression in source

I have a simple append query add tbl1.key, and a constant 3333 to tbl2.key  & tbk2,data.  
It does not run. it  generates this error

Duplicate output destination 'data'.
If I remove the 2 column there is no error message.

Here is a screen shot
User generated image
Avatar of PatHartman
PatHartman
Flag of United States of America image

What table are you appending to?  Does it have a column named conmember?  Please post the SQL rather than the picture.
Avatar of crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access

hi,

While the picture is nice, I agree with Pat -- the SQL would be a huge help ... as would the fields and data types in tblInvoices ... and the logic for using an existing records to add new records in the same table ... do you mean to have some criteria?  It seems this would add another record for every record that is already there with a literal value for conmember being what is specified by the calculated field.

What does InvEntityNum represent? And what are examples of its values?

Disregarding your explanation, since it is different than the screenshot ... can't see query properties such as Output All Fields, ... and maybe something is there but not showing. Without the SQL, it is not obvious to see how the duplicate destination is being specified.

to switch to the SQL view so you can post the SQL statement:

  • choose SQL View from the View drop-down, which is the first icon on the HOME ribbon.
  • You can also right-click in the design view on a spot that is not another object like a column or a fieldlist, and choose "SQL View" from the shortcut menu.

SQL is text that you can copy and paste into a message. Make sure you don't inadvertently change it. Undo is Ctrl-Z.

~~~
what is the data type for the problematic field?

~~~
If the problem was that this had run before and data rules were being violated, the error message should be something else. Seeing the SQL statement should clear things up.

~~~
> "If I remove the 2 column there is no error message."

if you remove them, what happens? Does data get added?

~~~

It appears that it is desired to add another detail row for someone ... are any of the other fields in the table design required? Wouldn't a date be required for an invoice? If this is a detail line for an invoice that already exists, it should be in a related table and there should be more information.

Or maybe the error message is wrong.

What is the primary key for tblInvoices? If an AuoNumber, you don't have to worry about filling it.

~~~
what is the source for the value of conmember? A control on a form? something else?

have an awesome day,
crystal
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Robert Berke

ASKER

Everyone suggested "give us the sql" which is I should have done in the first place.

But Gustov went one step farther and said "you have included * in your sql"

That is exactly right.  Even though the * does not show up in Design Layout, it does show up in SQL view.  I removed it and things are back to normal.  

Normally I would give some points to the other commenters, but I cannot see the option to dp so.   I think the EE interface is undergoing changes.
Gus is a good guesser because that's what he had to do to provide your solution.

It isn't necessary to give participation points to everyone else.  Splitting the award is appropriate when more than one person helped to get to your answer (the interface does allow you to do it.  You just check more than one post as assisted).  Splitting just to be nice punishes the person who actually did help.  How is that fair?    Gus guessed the answer and so deserves the points.
I've seen it more than once and always wondered, why the designer will not show the column with the lonely star.
If you put tablename.*, it will show.

So, I didn't even have to guess.

Have a nice weekend!
> "Even though the * does not show up in Design Layout"

yes it does -- on the property sheet. It is called "Output All Fields", which was my guess too ... in that rather wordy post ~ but maybe you glossed over that because the paragraph starts with "Disregarding your explanation"
You are right. It does show in the property sheet. Forgot that.

But I never use that for adjusting the SQL, only for adjusting "true" properties of the query. Maybe I should change that habit.
We all knew the answer was something we were not seeing.  Gus took a stab at the problem and was correct.
I now see that the "assisted answer" button  is only available in EE "Classic View".  It it is being replaced by a similar concept of "was this helpful?"  which still awards points, but does some of the math automatically.  

The details are a still a little vague, but I support the concept.