I have a Union query in an Access database (SELECT a FROM b WHERE c <= [param1] UNION SELECT d FROM e WHERE f <= [param1]) and this works well.
In a VB6 project which has a Data Environment connected to the database, I can add a command to the DataEnvironment which references the Union query as a Stored Procedure. Fine, so far. But how do I use the command? Let's say it's called qryUnion.
In code, I can code 'DataEnvirontment1.qryUnion strDate' though it objects to the number of parameters(!). Also, I don't seem to be able to find rsqryUnion anywhere (even in Intellisense) and therefore cannot reference the returned data (in fact I only want the RecordCount).
Has anyone any idea how to do this? I've not used Union queries before, though the one in Access works fine.
Thanks in advance.