I have a table that I update with a two value, a beginning range and and end range....I update this though code when a combo box changes. It is one record in a table....just a lookup record. I created a query that is supposed to use this table to get its between ranges...The code is pasted below
SELECT dbo_EmpPayDetailHist.szEmployeeId_tr, dbo_EmpPayDetailHist.dtWork_dt, dbo_EmpPayDetailHist.dHoursWorked_qty INTO wfc
FROM dbo_EmpPayDetailHist
WHERE (((dbo_EmpPayDetailHist.szEmployeeId_tr) Between [Dept]![BeginRange] And [Dept]![EndRange]) AND ((dbo_EmpPayDetailHist.dtWork_dt) Between [Forms]![frmHoursWorked]![txtFromDate] And [Forms]![frmHoursWorked]![txtThruDate]));
When I run this query it keeps asking for the parameters of Dept!BeginRange and Dept!EndRange....
Can someone tell me why it is not recognizing the table values....The fields are all texts.
SELECT dbo_EmpPayDetailHist.szEmployeeId_tr, dbo_EmpPayDetailHist.dtWork_dt, dbo_EmpPayDetailHist.dHoursWorked_qty INTO wfc
FROM dbo_EmpPayDetailHist
WHERE (((dbo_EmpPayDetailHist.szEmployeeId_tr) Between [Dept]![BeginRange] And [Dept]![EndRange]) AND ((dbo_EmpPayDetailHist.dtWork_dt) Between [Forms]![frmHoursWorked]![txtFromDate] And [Forms]![frmHoursWorked]![txtThruDate]));
When I run this query it keeps asking for the parameters of Dept!BeginRange and Dept!EndRange....
Can someone tell me why it is not recognizing the table values....The fields are all texts.