The Object variable or With block variable not set error could be caused by not creating an instance of the object you're referring to, i.e.Would fail.VB Code:
Dim oRs As ADODB.Recordset oRs.Open "SomeTable", "DSN=MYDSN;"OrVB Code:
Dim oRs As New ADODB.Recordset oRs.Open "SomeTable", "DSN=MYDSN;"Would Work.VB Code:
Dim oRs As ADODB.Recordset Set oRs = New ADODB.Recordset oRs.Open "SomeTable", "DSN=MYDSN;"




Reply With Quote