Problem With Recordsource Query

  • Thread starter Thread starter PeteVTX
  • Start date Start date
P

PeteVTX

I am trying to use the following query as the record source for a form:

SELECT * FROM dbo.tbl_employees WHERE dbo.tbl_employees.empID =
[Forms]![frm_listCSRs]![empID]

It works fine if I replace the = [Forms]![frm_listCSRs]![empID] with = 697
(which is a valid empID) and [Forms]![frm_listCSRs]![empID] definitely
contains the target empID!!

Any thoughts welcome.

Regards

Pete
 
I am trying to use the following query as the record source for a form:

SELECT * FROM dbo.tbl_employees WHERE dbo.tbl_employees.empID =
[Forms]![frm_listCSRs]![empID]

It works fine if I replace the = [Forms]![frm_listCSRs]![empID] with = 697
(which is a valid empID) and [Forms]![frm_listCSRs]![empID] definitely
contains the target empID!!

Any thoughts welcome.

Regards

Pete

Are you trying to use this as the recordsource for frm_listCSRs itself? You
won't be able to do so recursively!

What's the context? How does frm_listCSRs!EmpID get filled, and is the form
open when you're trying to open (a different) form based on this query?
 
John,

This query is for another form frm_employmentDetails which is opened from
frm_listCSRs when the user clicks on the target Cust Serv Rep (CSR) and this
generates empID. So frm_listCSRs IS open when the user opens
frm_employmentDetails

Regards

Pete

John W. Vinson said:
I am trying to use the following query as the record source for a form:

SELECT * FROM dbo.tbl_employees WHERE dbo.tbl_employees.empID =
[Forms]![frm_listCSRs]![empID]

It works fine if I replace the = [Forms]![frm_listCSRs]![empID] with = 697
(which is a valid empID) and [Forms]![frm_listCSRs]![empID] definitely
contains the target empID!!

Any thoughts welcome.

Regards

Pete

Are you trying to use this as the recordsource for frm_listCSRs itself? You
won't be able to do so recursively!

What's the context? How does frm_listCSRs!EmpID get filled, and is the form
open when you're trying to open (a different) form based on this query?
 
Back
Top