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?