I would like to know how i can to obtein records of a query to a datacontrol.
I try
Private Sub Form_Load()
Dim db As Database
Dim Rs As Recordset
Set db = OpenDatabase(App.Path & "\xpto.MDB"
Set Rs = db.OpenRecordset("SELECT cod_cli, nome FROM Tabela1;"
Set Data1.Recordset = Rs
End Sub
But it gives an error.
Thanks by the help.
DR
I try
Private Sub Form_Load()
Dim db As Database
Dim Rs As Recordset
Set db = OpenDatabase(App.Path & "\xpto.MDB"
Set Rs = db.OpenRecordset("SELECT cod_cli, nome FROM Tabela1;"
Set Data1.Recordset = Rs
End Sub
But it gives an error.
Thanks by the help.
DR