Below is the code from a test application. I'm getting a Run Time 91
error when the line with the recordset is processed. The error says
object variable or With block variable not set. This code is from a
help example, so it should run. Any ideas?
The form has a data control (Data1), and the flexgrid.
Thanks,
' General Declarations
Option Explicit
' Data1 Validate
Private Sub Data1_Validate(Action As Integer, Save As Integer)
End Sub
' Form Load
Private Sub Form_Load()
Data1.DatabaseName = "C:\Program Files\Microsoft Visual
Studio\FS5\FS.mdb"
Data1.RecordSource = "SELECT [NetName] FROM subnetwork"
Data1.Recordset.MoveLast ' Gives 91 error code.
End Sub
' MSFlexGrid1 Click
Private Sub MSFlexGrid1_Click()
End Sub