Append Query drops values. please help!!

  • Thread starter Thread starter MB
  • Start date Start date
M

MB

I am using Access 2002, and have created and Append Query.

This query works fine when I hit the "View" button. But
when I hit the Run button (i.e. actually executing the
append) the values 2 fields are now missing! (And yes the
fields were populated with values during the "View")

Does anyone have any
suggestions/recommendations/references. Any help is
greatly appreciated.

Here is the code for my query:
INSERT INTO [DBM Scorecard Summary Table] ( ei_nbr,
TimePeriodID, DBM_listname, TimePeriodDesc, total_sales,
SumOfcontact_count, wrapmins, LoginTimeSecs, AvgFigure,
MPS, hiredate, wrappercent, TLsurname, LTV_Score, TL_code )
SELECT [MPS Query].ei_nbr, [MPS Query].TimePeriodID, [MPS
Query].DBM_listname, [MPS Query].TimePeriodDesc, [SALES:
PAP and MOBI combined 20040414].total_sales,
CONTACTS.SumOfcontact_count, WRAPTIME.wrapmins,
[PRODUCTION HOURS: TALK AND WRAP TIME].LoginTimeSecs, [CQ:
DBM Query part 3].AvgFigure, [MPS Query].MPS, [MPS
Query].hiredate, [wrapmins]/[LoginTimeSecs]*100 AS
wrappercent, (SELECT LAST([team_leads]![team_ldr_surname])
FROM [team_leads] WHERE [TL_code] = [team_leads]!
[team_ldr_cd] ) AS TLsurname, [LivingTheValues
Query].LTV_Score, [MPS Query].TL_code
FROM [PRODUCTION HOURS: TALK AND WRAP TIME], [SALES: PAP
and MOBI combined 20040414], CONTACTS, WRAPTIME, [CQ: DBM
Query part 3], [MPS Query], [LivingTheValues Query];


The fields with missing values are "TLsurname"
and "TL_code"
 
Hi MB,

Did you try changing subquery?

(SELECT LAST([team_ldr_surname])
FROM [team_leads]
WHERE
[team_ldr_cd]= [MPS Query].TL_code)
AS TLsurname

Of course I could be completely off base.

Good luck,

Gary Walter
 
or this might be another case of too many
"nested levels of FROM."

I "think" you could use DMax instead of subquery.

if TL_code is type text:

DMax("team_ldr_surname","team_leads","team_ldr_cd ='" & [MPS Query].TL_code & "'") AS
TLsurname

if TL_code is type number:

DMax("team_ldr_surname","team_leads","team_ldr_cd =" & [MPS Query].TL_code ) AS
TLsurname
 
Back
Top