Confused! Can I or not?

brianinmaine

New member
Local time
Today, 16:46
Joined
Sep 7, 2001
Messages
5
I have a continuous form based on a table to schedule many classes.

In a query, I can get a total of the number of students per class, and a total of the number of students per period.

Can I reference that query total in my form?
When I try "=[QueryName]![StudentTotal]" as the control source of a textbox, I always get Name? errors. I've tried many other ways, but always the same result.

My question is, can I reference a query result total in a form where the control source is a table? When I base the form on a query, I can't update the fields I want (select query?). I'm probably doing something wrong, but what?
 
It's really not a bad idea to create your query to look like your table and add the calculated fields to it... then just use the a text box to display it... however.. if you must do it this way, you can use docmd.openquery and open it in the background.. you will have to filter it to the record you are on and then you can reference it, but it has to be open... hth...
 
How do you reference the result of a query and put it on a form in a text box? My query produces one value.
 

Users who are viewing this thread

Back
Top Bottom