Hi,

In vb i used data form wizard to create Master/Details form from a database. When i run that code i get a error in the below line:

Private Sub Form_Load()
Set grdDataGrid.DataSource = datPrimaryRS.Recordset("ChildCMD").UnderlyingValue
End Sub

It says Data error event hit err:[ADODC]: Unknown error. [ADO] then it says
Runtime error '91'
Object Variable or With block Variable not set.

But when i use Northwind database it doesnot give me error and its working fine.

Can somebody help me on this please.

Krs

An invalid variable is being referenced. To create an object variable, declare the object variable and then assign a valid reference to the object variable using the Set statement. Similarly, a With...End With block must be initialized by executing the With statement entry point.


1.Make sure the object variable references a valid object, and specify or respecify a reference for the object.
2.Make sure you did not use an object variable set to Nothing.
3.Make sure the object library in which the object has been described has been selected in the Add References dialog box.
4.Make sure your With block is initialized by executing the With statement entry point.

Hi,

I have solved the issue. Its nothing Vb6 doesnot support access 2000/2003 database. When i convert it to 97 it worked fine.

VB6 actually do support access 2000/2003. Your problem was with the data control. If you have however solved this, please mark it as solved, thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.