make value of text box (or other control) that of query

  • Thread starter Thread starter JR
  • Start date Start date
J

JR

I am trying to get a text box on a report equal the value returned by the
following query:

SELECT Employee.LastName
FROM Employee
WHERE (((Employee.EmployeeID)=[Forms]![Form1]![EmployeeID]));

The query works and returns the LastName of the employee whose ID is entered
on Form1. What I can not figure out is how to pass that value to the text
box in the heading of the report that itself shows all actions being worked
by that particular employee.

Everything works but the heading which should reflect the employee's name in
it.

What am I doing wrong or not doing?

Thanks!
 
Include the employee name in the source for the report then use that field in
the header.
 
Well, almost but not quite.

rebuilt from scratch. Built a qry and from that built the report and once
again all is functional but the ability to pull the name up to the title.
Can not figure this one out as the name shows in the report, but not on title.

The name on the report gets its value from a form and works ever time, BUT
once I put a control in the title area I get prompted for a parameter.



KARL DEWEY said:
Include the employee name in the source for the report then use that field in
the header.
--
Build a little, test a little.


JR said:
I am trying to get a text box on a report equal the value returned by the
following query:

SELECT Employee.LastName
FROM Employee
WHERE (((Employee.EmployeeID)=[Forms]![Form1]![EmployeeID]));

The query works and returns the LastName of the employee whose ID is entered
on Form1. What I can not figure out is how to pass that value to the text
box in the heading of the report that itself shows all actions being worked
by that particular employee.

Everything works but the heading which should reflect the employee's name in
it.

What am I doing wrong or not doing?

Thanks!
 
Your orignal post said 'text box in the heading of the report' but here you
are saying 'BUT once I put a control in the title area I get prompted for a
parameter.'

What version of Access do you have? Mine, 2007, does not have a 'title
area.'

--
Build a little, test a little.


JR said:
Well, almost but not quite.

rebuilt from scratch. Built a qry and from that built the report and once
again all is functional but the ability to pull the name up to the title.
Can not figure this one out as the name shows in the report, but not on title.

The name on the report gets its value from a form and works ever time, BUT
once I put a control in the title area I get prompted for a parameter.



KARL DEWEY said:
Include the employee name in the source for the report then use that field in
the header.
--
Build a little, test a little.


JR said:
I am trying to get a text box on a report equal the value returned by the
following query:

SELECT Employee.LastName
FROM Employee
WHERE (((Employee.EmployeeID)=[Forms]![Form1]![EmployeeID]));

The query works and returns the LastName of the employee whose ID is entered
on Form1. What I can not figure out is how to pass that value to the text
box in the heading of the report that itself shows all actions being worked
by that particular employee.

Everything works but the heading which should reflect the employee's name in
it.

What am I doing wrong or not doing?

Thanks!
 
It is the Report Header.

JR

KARL DEWEY said:
Your orignal post said 'text box in the heading of the report' but here you
are saying 'BUT once I put a control in the title area I get prompted for a
parameter.'

What version of Access do you have? Mine, 2007, does not have a 'title
area.'

--
Build a little, test a little.


JR said:
Well, almost but not quite.

rebuilt from scratch. Built a qry and from that built the report and once
again all is functional but the ability to pull the name up to the title.
Can not figure this one out as the name shows in the report, but not on title.

The name on the report gets its value from a form and works ever time, BUT
once I put a control in the title area I get prompted for a parameter.



KARL DEWEY said:
Include the employee name in the source for the report then use that field in
the header.
--
Build a little, test a little.


:

I am trying to get a text box on a report equal the value returned by the
following query:

SELECT Employee.LastName
FROM Employee
WHERE (((Employee.EmployeeID)=[Forms]![Form1]![EmployeeID]));

The query works and returns the LastName of the employee whose ID is entered
on Form1. What I can not figure out is how to pass that value to the text
box in the heading of the report that itself shows all actions being worked
by that particular employee.

Everything works but the heading which should reflect the employee's name in
it.

What am I doing wrong or not doing?

Thanks!
 
Back
Top