IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Stupid Help example.
I am trying to get assistance on why I am getting a type mismatch error:

Here is the code, BTW:

Dim CurrentDB As Database

Set CurrentDB = DBEngine.Workspaces(0).Databases(0)

Dim TempRS As Recordset

Set TempRS = CurrentDB.OpenRecordset("Table1")


It doesn't like the last line. Works fine in Access 97. So I go the Access2k's Help system, type in "OpenRecordset", it gives me an "OpenRecordset Method" topic. . . .but no documentation comes up. Nothing comes up for the next topic, "Append method" either. Some topics actually have something, others don't. It's infuriating.
New DAO/ADO confusion
It would seem there's a RecordSet in the ActiveX Data Objects and a RecordSet in the Data Access Objects. And they aren't compatible, of course. The suggested fix is to declare TempRS as DAO.RecordSet
New Re: DAO/ADO confusion
Argh.

Although it wouldn't even compile when I didn't have the DAO Object Library referenced. Thankee much, kind sir. Ma'am. Whatever.
New Now you know why I don't like VBA. :-)
Microsoft got carried away with creating so many object hierarchies that the code gets hard to write.

Wade.

"All around me are nothing but fakes
Come with me on the biggest fake of all!"

New Bah!
And now I just tried it on a different MDB and it won't work there.

They must specifically try to screw up their products. No set of developers can actually be that bad.
New I've never had to set CurrentDB
It's always referenced for me in Access 95/97. So I would rewrite your snippet as simply:

Dim TempRS As Recordset

Set TempRS = CurrentDB.OpenRecordset("Table1")


If that helps. Doesn't fix Help, but hope it helps.
---------------------------------
A stupid despot may constrain his slaves with iron chains; but a true politician binds them even more strongly by the chain of their own ideas;...despair and time eat away the bonds of iron and steel, but they are powerless against the habitual union of ideas, they can only tighten it still more; and on the soft fibres of the brain is founded the unshakable base of the soundest of Empires."

Jacques Servan, 1767
New I always wondered about that.
I think I figured that out once, but then just kept copying the old code over so it never sunk in.
     What's different between M$ Access 97 and Access 2000? - (CRConrad) - (14)
         Create this clutter... - (ChrisR) - (11)
             Aha, thanks. Anything more? Anyone else? Cagle...? -NT - (CRConrad) - (9)
                 The difference - (nking)
                 Erk. Here I am. - (acagle) - (7)
                     Stupid Help example. - (acagle) - (6)
                         DAO/ADO confusion - (scoenye) - (1)
                             Re: DAO/ADO confusion - (acagle)
                         Now you know why I don't like VBA. :-) - (static) - (1)
                             Bah! - (acagle)
                         I've never had to set CurrentDB - (tseliot) - (1)
                             I always wondered about that. - (acagle)
             Re: Create this clutter... - (altmann)
         Here's a few quick differences - (rickw) - (1)
             Re: form f is created and bound to v. - (mmoffitt)

It was a good party...
48 ms