Simple Access2000 ?

I have created a Query that I want to use in a text box on a form

For this, I added =Max([TestQuery]![N S1 Results]) in the Control Source of the text box.

TestQuery is the name of the Query. N S1 Results is the field that I want the Max function of.

No worky.

Access asks to ‘Enter Parameter Value’ for TestQuery!N S1 Results.

Any thoughts?


It sounds like your query is what actually needs the input. Do you get the same behavior when you open the query?

Nope, the query works fine.

This is my first shot at any access stuff, but I’ve done quite a bit of other programming.

I was wondering if it is the syntax in the form?

I do a dcount on the same query in the form and it works fine.


OK, just off the top of my head, what exactly are you trying to do? I read this as, if you have a form that gets one record at a time, your asking the field to perform an operation on that text box, ie., get max number from this table of this field. Do you want to use a list box or combo box instead?


The text box is in a report, not a form. Basically all I want to do is return the MAX of a number field that is called by a query.

Sorry, mixed up forms with reports. Different code, different terms.

Ok, big difference. I just whipped up a table, query, form, report. With the query, here’s the SQL statement:
SELECT DISTINCTROW Max(test_table.alpha_2) AS MaxOfalpha_2
FROM test_table;
I have three records in a dummy table, number field, and the report returns one record from the three with 250 in it. The other two records are 50 and 100. On the report, this is what the text box looks like:
Of the three records, it only displays the 250.
Is this what you’re looking for?


The only difference I see is a lack of square brackets in your text box statement.

I’m not at work now, will give her a try tommorow.

I will also do a double check of the SQL call.