Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debugging Help: OpenRecordset can't find the table (I think) 1

Status
Not open for further replies.

Ogart

Technical User
Mar 26, 2003
104
US
I get the bug on the -->> line.
The debugger claims: Type Error MisMatch

Dim db As Database
Dim rec As Recordset
Set db = CurrentDb()
-->>Set rec = db.OpenRecordset("T_AppSegment")

The table exists and it's spelled right. Any clue why I'm getting a type error mismatch? I'm sure it's something stupid. I've got DAO 3.6 Ref library going.

I can offer nothing but a star for any help.

Also, I know I've posted a lot of questions, and let the record show you all have been very helpful. This app I've worked on off and on for the last 6 mos is really sweet. Thanks for help past, present and future.
 

Two things...

First, try...

Set rec = db.OpenRecordset("T_AppSegment", dbOpenTable)

Second, I am not sure if it matters, but you may need to use ...

Dim db As DAO.Database
Dim rec As DAO.Recordset

if using DAO.

Richard
 
The DAO thing was the problem.

My understanding is that a recordset is a DAO thing to begin with. Is there a "non-DAO" way of doing this? The procedure I have in mind is going to go through ever record in that table and update one of the fields.

Appreciate the help, sir. By the way, nice post helping out that table design person (not related to this post).

Be good!
 
Ogart

Thanks for the star. (And you read that other article huh - glad you liked it.)

From a coding perspective, there is ADOX which can be used with Access 2000 and 2002. From my perspective, DAO meets my needs, and I am hoping Microsoft will keep it around.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top