0

Hi,

I have a data object named dataCounter and a MSFlexGrid named gridCounter.

I am trying to set the gridCounter.datasource to the dataCounter

Dim dbMyDB As Database
Dim rsMyRS As Recordset

Set dbMyDB = OpenDatabase(App.Path & "\Counter.mdb")
Set rsMyRS = dbMyDB.OpenRecordset("CounterTable", dbOpenDynaset)

Set gridCounter.DataSource = dataCounter

I keep getting a Run-time error “91”. Can anyone suggest anything?

Thanks very much!!

2
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by FisherJT
0

Set gridCounter.DataSource = dataCounter?

Where is it defined?

Set gridCounter.DataSource = rsMyRs

Good Luck

0

Thanks vb5prgrmr!

I tried that, but I keep getting the same error.

0

So, Object variable not set...

Use the data form wizard to recreate the ADODC and grid you want. Then take that and place on your form.

Good Luck

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.