'Enter parameter value' message

J

John

Hi

I have a form with a list box and a sub form. The list box is bound to a
query. The query uses a field from the sub form in its selection criteria.
The query looks like this;

SELECT DISTINCTROW [Staff Payments].[Event ID], [Staff Payments].Rate,
Format([Date],"dd/mm/yyyy") AS [Pay Date], [Staff Payments].Role, [Staff
Payments].Client, [Staff Payments].Hours
FROM [Staff Payments]
WHERE ((([Staff Payments].[Staff ID])=[Forms]![Staff Rate
Update]![Child2].[Form]![Staff ID]))
ORDER BY [Staff Payments].Date DESC;

The problem is that when I close the form I get the message 'Enter parameter
value [Forms]![Staff Rate Update]![Child2].[Form]![Staff ID]'. My question
is why do I not get this message with million and one other forms I have
done over years that use the same technique? What is the way to get rid of
this error?

Many Thanks

Regards
 
J

Jeanette Cunningham

Hi John,
this is just guessing - access is still trying to do the query when you
close and can't find staffID on the subform. Is it possible that this query
is called somewhere else on the form and can't resolve the reference to the
subform? or on the form's property sheet as a row source ?

Jeanette Cunningham
 

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