|
-
Jul 4th, 2005, 12:43 AM
#1
Thread Starter
Lively Member
EXECUTE problem
hey,is this code right?
Option Compare Database
Dim DB As DAO.Database
Dim SQL1 As String
Private Sub Form_Load()
Set DB = CurrentDb
End Sub
Private Sub Command1_Click()
SQL1 = "insert into table1 (no,name) values (1,'aymun')"
DB.Execute (SQL1)
End Sub
whenever i run this code,i get this error:
run time error '91':
object variable or with block variable not set.
can any one help please?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|