From 2003 to2007

J

Jean-Paul

Hi,

I converted my code from my previous 2003 version to the new access2007
version.

I get following error:
(I have to translate so could be a bit different)

error 13 during executing:
Types are not matching

The code:

Dim db As Database
Dim tb As Recordset
Dim kl As String, afd As String, jr As String
Set db = CurrentDb()
Dim sql As String
sql = "SELECT leerlingen.* FROM leerlingen Where leerlingen.ID=" &
[Forms]![Gedrag]![leerling] & " ; "
Set tb = db.OpenRecordset(sql)

I get the message at line:
Set tb = db.OpenRecordset(sql)

In my 2003 version there is no problem... in the 2007 there is!!

What to do?
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

getting a record 2
code goes too fast 1
next record please 6
recordset "over" 2 forms 3
sql and recordcount dont give same results 7
Editing record 2
variable is null??? 5
entryfield linked to selectionlist 1

Top