A
Ayala
Hi, I build a union query
SELECT GenDataID, Measure, StartTorque, RatedSpeed,
MaxSpeed, " ", " ", "Nominal Data" as [Measurement]
FROM qryNominalData
UNION SELECT GenDataID, SubProduct, Readings,
Value, " ", " ", " ", "VMS Readings"
FROM qryVMSReadings
UNION SELECT GenDataID, SubProduct, AGSensor,
VMSIndication, VoltageReadonDisplay, " ", " ", "Air Gap"
FROM qryAirGap
UNION SELECT GenDataID, SubProduct, RecoolingSysSensor,
IndicationDisplayVMS, " ", " ", " ", "Recooling System"
FROM qryRecoolingSys
UNION SELECT GenDataID, SubProduct, RingMeasurements,
PT100, TempDisplayVMS, AlarmSetPoint, TripSetPoint, "Check
Measurements"
FROM qryCheckMeasurements
ORDER BY [Measurement];
then I make the recordset of this query. Now I want to
filter on Measurement so I can get the data separately
for "Nominal Data", "Vms Readings", "Air Gap", etc.
the statement look like:
dim strFiltro as string
strFiltro = rstData!Measurement Like "Nominal Data"
or
strFiltro = rstData!Measurement Like "Air Gap"
rstData.Filter = strFiltro
But then I get this:
Error -2147217908: Command text was not set for the
command object
Can someone guide me in the right way of filtering my
recordset?
thx
SELECT GenDataID, Measure, StartTorque, RatedSpeed,
MaxSpeed, " ", " ", "Nominal Data" as [Measurement]
FROM qryNominalData
UNION SELECT GenDataID, SubProduct, Readings,
Value, " ", " ", " ", "VMS Readings"
FROM qryVMSReadings
UNION SELECT GenDataID, SubProduct, AGSensor,
VMSIndication, VoltageReadonDisplay, " ", " ", "Air Gap"
FROM qryAirGap
UNION SELECT GenDataID, SubProduct, RecoolingSysSensor,
IndicationDisplayVMS, " ", " ", " ", "Recooling System"
FROM qryRecoolingSys
UNION SELECT GenDataID, SubProduct, RingMeasurements,
PT100, TempDisplayVMS, AlarmSetPoint, TripSetPoint, "Check
Measurements"
FROM qryCheckMeasurements
ORDER BY [Measurement];
then I make the recordset of this query. Now I want to
filter on Measurement so I can get the data separately
for "Nominal Data", "Vms Readings", "Air Gap", etc.
the statement look like:
dim strFiltro as string
strFiltro = rstData!Measurement Like "Nominal Data"
or
strFiltro = rstData!Measurement Like "Air Gap"
rstData.Filter = strFiltro
But then I get this:
Error -2147217908: Command text was not set for the
command object
Can someone guide me in the right way of filtering my
recordset?
thx