How to use table field as query criteria Access 2010

tegb

Registered User.
Local time
Today, 17:55
Joined
Feb 14, 2012
Messages
49
I have a table that has one field and I want to use this field as a query criteria . when i click on CRITERIA & BUILD, Access lets me select the table field and shows [tblBillRun]![Bill_Run] for the criteria but when I click RUN, it prompts me to ENTER PARAMETER VALUE. What am i doing wrong?
 
Show your query string.
 
You need to create a query to join the two tables on Bill_Run. The inner join will restrict the rows returned to be only rows where the same Bill_Run value appears in both tables.
 
INSERT INTO [Detail] ( ADID_CD, [TOT POP], LOAD_PRD, RUN_DATE, Run, ReportYYYYMM )
SELECT Billed.ADID_CD, Billed.EMPL_ASGND_BF_MACH_CNT AS [TOT POP], Billed.LOAD_PRD, Billed.RUN_DATE, [Run Table].Report_Run, [Run Table].ReportYYYYMM
FROM ([ADID Rollup] INNER JOIN Billed ON [ADID Rollup].REPADID = Billed.ADID_CD) INNER JOIN [Run Table] ON Billed.RUN_DATE = [Run Table].Report_Date
GROUP BY Billed.ADID_CD, Billed.EMPL_ASGND_BF_MACH_CNT, Billed.LOAD_PRD, Billed.RUN_DATE, [Run Table].Report_Run, [Run Table].ReportYYYYMM
HAVING (((Billed.EMPL_ASGND_BF_MACH_CNT)<>0) AND (([Run Table].Report_Run)=[tblBillRun]![Bill_Run]) AND (([Run Table].ReportYYYYMM)=[forms]![FrmBilledRevn]![txtMonth]));
 

Users who are viewing this thread

Back
Top Bottom