How to read BDD.OpenRecordset(SQL). Code Insert.

chris-chumillas

New member
Local time
Today, 17:01
Joined
Nov 23, 2006
Messages
5
Hello,


How to read the result of "BDD.OpenRecordset(SQL)", my line code is:

Private Sub Commande11_Click()
Dim BDD As Database
Dim TBL As dao.Recordset
Dim SQL As String

Set BDD = OpenDatabase("d:\fia\fia.ch.mdb") 'open BDD
SQL = "SELECT * FROM vehiculo where cod_user = 1"
Set TBL = BDD.OpenRecordset(SQL)

txt_sql.Value = TBL 'HERE! I would like TO VIEW THE RESULT

TBL.Close 'cierra tabla
BDD.Close 'cierra base de datos

End Sub

I'm very stupid, I dont view the result of this code. What is my problem? I would like to view the result of my sentence. Thx for help-me. Christophe.
 
I think dont run!

When I put your line code, 3033 is the number of the error its appears. I'm working with Access XP or 2002 and security system with "User Administrator in access". Why this problem?
 

Users who are viewing this thread

Back
Top Bottom