I have a data control that I write a sql statement on the fly and
populate the recordset like so.
Set Rst = Db.OpenRecordset("SELECT DISTINCT * FROM Source_UnitMaster
.... join and where clause")
set dat_Equip.Recordset = Rst (this is a DAO recordset)
This gives me a "operation is not supported by this object" at the
second line.
Oddly if I remove the DISTINCT it does not error out. Even more
weird, if I remove a few fields from the Source_UnitMaster it works
with the DISTINCT.
As far as I can tell it seems to be a jet issue because the code works
fine in Access 2002. I read somewhere that VB 5.0 uses a diferrent
version of Jet than Access 2002.
Is there a size limit to the data control, if so how do I get around
this?
I realize that the data control is problably not the best way to do
it, but this is an existing app that i really don't want to redo if
possible.
Some stats.
VB version 5.0 sp3
Access 2002
DAO 3.6 referenced
Thanks for the help.