Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with Between criteria 1

Status
Not open for further replies.

MICKI0220

IS-IT--Management
Jul 20, 2004
337
US
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.
 
wow that was simple....Thanks for the reply
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top