how to use recordset

  • Thread starter Thread starter alejandro
  • Start date Start date
A

alejandro

What i m doing wrong in this code i want to load a form qirh a recordset but
something is wrong

Private Sub Form_Open(Cancel As Integer)

Dim rsf As Recordset
Dim ssql As String
ssql = "select * from product where code=1 "
rsf.Open
Set rsf = ssql
Form_individual.Recordset = rsf
rsf.Close
 
Why?

Me.RecordSource = "select * from product where code=1"

will do.
 

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


Back
Top