A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

'Enter parameter value' message



 
 
Thread Tools Display Modes
  #1  
Old January 7th, 2008, 04:28 AM posted to microsoft.public.access,microsoft.public.access.forms,microsoft.public.access.formscoding,microsoft.public.access.queries
John
external usenet poster
 
Posts: 409
Default 'Enter parameter value' message

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


  #2  
Old January 7th, 2008, 05:09 AM posted to microsoft.public.access,microsoft.public.access.forms,microsoft.public.access.formscoding,microsoft.public.access.queries
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default 'Enter parameter value' message

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


"John" wrote in message
...
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




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.