Problem With Recordsource Query

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
 
J

John W. Vinson

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?
 
P

PeteVTX

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top