using the OR Critira on a query grid

Jon123

Registered User.
Local time
Today, 07:59
Joined
Aug 29, 2003
Messages
668
I have a query that runs to check if a form has any empty delay hrs.
Code:
SELECT [Tble-wcDelays].ID1, [Tble-wcDelays].LinkingID, [Tble-wcDelays].HoursDelay, [Tble-wcDelays].ReasonDelay
FROM [Tble-wcDelays]
GROUP BY [Tble-wcDelays].ID1, [Tble-wcDelays].LinkingID, [Tble-wcDelays].HoursDelay, [Tble-wcDelays].ReasonDelay
HAVING ((([Tble-wcDelays].LinkingID)=[Forms]![Frm-RPC]![wetcleanID]) AND (([Tble-wcDelays].HoursDelay) Is Null)) OR ((([Tble-wcDelays].LinkingID)=[Forms]![Frm-RPG]![wetcleanID]) AND (([Tble-wcDelays].HoursDelay) Is Null));

I'mtrying to avoid cerating multiple queries that dothe same thing. But if this qurey runs from the form "FRM-RPG" then It errors because it can't find "FRM-RPC" so why does it not over look that frm and go to the 2nd Frm ?
 
Because it can't evaluate the expression if the form is not open. All expressions must be evaluated.
 
so then I need to use a seperate query for each form.
 
Or be more specific on exactly WHAT info is on each form, and clearly identify which form(s) must be open to answer the query.

Can you write down your requirements in plain English?
Perhaps there are options to get the info you need.
 

Users who are viewing this thread

Back
Top Bottom