|
-
Oct 27th, 2000, 11:20 AM
#1
Thread Starter
Junior Member
Everyone :
I'm trying to use flexgrid for the first time but I keep getting a "Object var or with block var not set" error on the datasource line. If I switch to a datagrid, this code works fine.
Dim objConn As ADODB.Connection
Dim objRS As ADODB.Recordset
Set objConn = New ADODB.Connection
Set objRS = New ADODB.Recordset
objConn.Provider = "Microsoft.Jet.OLEDB.4.0"
objConn.CursorLocation = adUseClient
objConn.ConnectionString = "Data Source=c:\applications\cumber\customerlist.mdb"
objConn.Open
sSQL = "select * from tblCustomer"
objRS.Source = sSQL
Set objRS.ActiveConnection = objConn
objRS.Open
<<<< Error on this line. >>>>>
Set grdCustomer.DataSource = objRS
Thanks for your help,
Dale Williams
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|