J
JUSTIN HOBBS
I have a paramater query that pulls the entries between two dates, it pulls
up multiple records. I need to use one column (FLOOR LOCATION) of those
records as criteria in a new query to pull up any other entries no matter
what date they are entered. I know this is possible by typing them in, but
is there an expression that can be typed into the criteria to reference the
column and put them in the criteria as an "Or" statement. If it will help I
here is the SQL of the two queries.
SELECT Trim([MODULE] & " " & [EQUIPMENT LOCATION ROW LETTER] & " " &
[EQUIPMENT LOCATION ROW #]) AS [FLOOR LOCATION], [HEAT LOAD BY DATE
QUERY].[DATE ENTERED], Sum([HEAT LOAD BY DATE QUERY].AMPS) AS SumOfAMPS,
Sum([HEAT LOAD BY DATE QUERY].WATTS) AS SumOfWATTS, Sum([HEAT LOAD BY DATE
QUERY].CFM) AS SumOfCFM, [HEAT LOAD BY DATE QUERY].MODULE
FROM [HEAT LOAD BY DATE QUERY]
GROUP BY Trim([MODULE] & " " & [EQUIPMENT LOCATION ROW LETTER] & " " &
[EQUIPMENT LOCATION ROW #]), [HEAT LOAD BY DATE QUERY].[DATE ENTERED], [HEAT
LOAD BY DATE QUERY].MODULE, [HEAT LOAD BY DATE QUERY].[EQUIPMENT LOCATION ROW
#], [HEAT LOAD BY DATE QUERY].[EQUIPMENT LOCATION ROW LETTER], [HEAT LOAD BY
DATE QUERY].SECTION, [HEAT LOAD BY DATE QUERY].CELL
HAVING ((([HEAT LOAD BY DATE QUERY].[DATE ENTERED]) Between [ENTER THE START
DATE ] And [ENTER THE ENDING DATE]) AND (([HEAT LOAD BY DATE
QUERY].CELL)<>"ss"))
ORDER BY [HEAT LOAD BY DATE QUERY].MODULE, [HEAT LOAD BY DATE
QUERY].[EQUIPMENT LOCATION ROW #], [HEAT LOAD BY DATE QUERY].[EQUIPMENT
LOCATION ROW LETTER];
Here is the second query:
SELECT Trim([MODULE] & " " & [EQUIPMENT LOCATION ROW LETTER] & " " &
[EQUIPMENT LOCATION ROW #]) AS [FLOOR LOCATION], Sum([HEAT LOAD BY DATE
QUERY].AMPS) AS SumOfAMPS, Sum([HEAT LOAD BY DATE QUERY].WATTS) AS
SumOfWATTS, Sum([HEAT LOAD BY DATE QUERY].CFM) AS SumOfCFM
FROM [HEAT LOAD BY DATE QUERY]
GROUP BY Trim([MODULE] & " " & [EQUIPMENT LOCATION ROW LETTER] & " " &
[EQUIPMENT LOCATION ROW #]), [HEAT LOAD BY DATE QUERY].MODULE, [HEAT LOAD BY
DATE QUERY].[EQUIPMENT LOCATION ROW #], [HEAT LOAD BY DATE QUERY].[EQUIPMENT
LOCATION ROW LETTER], [HEAT LOAD BY DATE QUERY].SECTION, [HEAT LOAD BY DATE
QUERY].CELL
HAVING ((([HEAT LOAD BY DATE QUERY].CELL)<>"ss"))
ORDER BY [HEAT LOAD BY DATE QUERY].MODULE, [HEAT LOAD BY DATE
QUERY].[EQUIPMENT LOCATION ROW #], [HEAT LOAD BY DATE QUERY].[EQUIPMENT
LOCATION ROW LETTER];
up multiple records. I need to use one column (FLOOR LOCATION) of those
records as criteria in a new query to pull up any other entries no matter
what date they are entered. I know this is possible by typing them in, but
is there an expression that can be typed into the criteria to reference the
column and put them in the criteria as an "Or" statement. If it will help I
here is the SQL of the two queries.
SELECT Trim([MODULE] & " " & [EQUIPMENT LOCATION ROW LETTER] & " " &
[EQUIPMENT LOCATION ROW #]) AS [FLOOR LOCATION], [HEAT LOAD BY DATE
QUERY].[DATE ENTERED], Sum([HEAT LOAD BY DATE QUERY].AMPS) AS SumOfAMPS,
Sum([HEAT LOAD BY DATE QUERY].WATTS) AS SumOfWATTS, Sum([HEAT LOAD BY DATE
QUERY].CFM) AS SumOfCFM, [HEAT LOAD BY DATE QUERY].MODULE
FROM [HEAT LOAD BY DATE QUERY]
GROUP BY Trim([MODULE] & " " & [EQUIPMENT LOCATION ROW LETTER] & " " &
[EQUIPMENT LOCATION ROW #]), [HEAT LOAD BY DATE QUERY].[DATE ENTERED], [HEAT
LOAD BY DATE QUERY].MODULE, [HEAT LOAD BY DATE QUERY].[EQUIPMENT LOCATION ROW
#], [HEAT LOAD BY DATE QUERY].[EQUIPMENT LOCATION ROW LETTER], [HEAT LOAD BY
DATE QUERY].SECTION, [HEAT LOAD BY DATE QUERY].CELL
HAVING ((([HEAT LOAD BY DATE QUERY].[DATE ENTERED]) Between [ENTER THE START
DATE ] And [ENTER THE ENDING DATE]) AND (([HEAT LOAD BY DATE
QUERY].CELL)<>"ss"))
ORDER BY [HEAT LOAD BY DATE QUERY].MODULE, [HEAT LOAD BY DATE
QUERY].[EQUIPMENT LOCATION ROW #], [HEAT LOAD BY DATE QUERY].[EQUIPMENT
LOCATION ROW LETTER];
Here is the second query:
SELECT Trim([MODULE] & " " & [EQUIPMENT LOCATION ROW LETTER] & " " &
[EQUIPMENT LOCATION ROW #]) AS [FLOOR LOCATION], Sum([HEAT LOAD BY DATE
QUERY].AMPS) AS SumOfAMPS, Sum([HEAT LOAD BY DATE QUERY].WATTS) AS
SumOfWATTS, Sum([HEAT LOAD BY DATE QUERY].CFM) AS SumOfCFM
FROM [HEAT LOAD BY DATE QUERY]
GROUP BY Trim([MODULE] & " " & [EQUIPMENT LOCATION ROW LETTER] & " " &
[EQUIPMENT LOCATION ROW #]), [HEAT LOAD BY DATE QUERY].MODULE, [HEAT LOAD BY
DATE QUERY].[EQUIPMENT LOCATION ROW #], [HEAT LOAD BY DATE QUERY].[EQUIPMENT
LOCATION ROW LETTER], [HEAT LOAD BY DATE QUERY].SECTION, [HEAT LOAD BY DATE
QUERY].CELL
HAVING ((([HEAT LOAD BY DATE QUERY].CELL)<>"ss"))
ORDER BY [HEAT LOAD BY DATE QUERY].MODULE, [HEAT LOAD BY DATE
QUERY].[EQUIPMENT LOCATION ROW #], [HEAT LOAD BY DATE QUERY].[EQUIPMENT
LOCATION ROW LETTER];