Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adodc control gives "subscript out of range" error

Status
Not open for further replies.

hinchdog

Programmer
Feb 14, 2001
380
US
i have an adodc control on my startup form. in the forms load event i use this code...

sConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Classes.mdb;Mode=ReadWrite;Persist Security Info=False;Jet OLEDB:Database Password=TEST"

With Adodc_Teacher
.ConnectionString = sConnect
.RecordSource = "Select * From Teacher WHERE ID=1"
.Refresh
End With

i have the adodc to use a connection string with a commantype "adCmdText". anyone see the problem here??
 
Im not sure

It might be because you have the code in the formload event.

Why not create a command button on the form which runs this code - just to see it the code is ok.

Remove the code from the load event.

Good luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top