By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,109 Members | 993 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,109 IT Pros & Developers. It's quick & easy.

help me to avoid 3704 error object not found error in bolds

P: 1
Option Explicit
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset

Private Sub Command1_Click()
rs.MoveFirst
Call display
End Sub

Private Sub Command2_Click()
rs.MoveNext
Call display
End Sub

Private Sub main()
db.Open = "dsn = student"
Set rs = db.Execute("select * from student")
End Sub
Private Sub display()
Text1 = rs("name")
Text2 = rs("rollno")
Text3 = rs("m1")
Text4 = rs("m2")
Text5 = rs("m3")
Text6 = rs("total")
End Sub

Private Sub clear()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
End Sub

Private Sub Command3_Click()
rs.MoveLast
Call display
End Sub

Private Sub Command4_Click()
rs.MovePrevious
Call display
End Sub

Private Sub Command5_Click()
Call clear
End Sub

Private Sub Command6_Click()
Call assign
End Sub

Private Sub Command7_Click()
Call delete
End Sub

Private Sub Command8_Click()
Set rs = db.Execute("select * from student where rollno = '''&text1.text''' ")
Call display
End Sub
Private Sub assign()
rs.AddNew
Set rs = db.Execute("insert into student values &'''text1'''&,&'''text2'''&,&'''text3'''&,&'''text 4'''&,&'''text5'''&,&'''text6'''")

End Sub
Private Sub delete()
Set rs = db.Execute("delete * from student where rollno='''&text1.text''' ")
End Sub
Sep 14 '07 #1
Share this Question
Share on Google+
1 Reply


Expert 5K+
P: 8,434
Is Sub Main being executed?
Sep 14 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.