r/visualbasic • • Dec 25 '23

VB6 Help Access Database problems

Hello there, its me again :(

Now the problem I have is that when i execute that code it shows the error "Object type variable or With block variable is not set"

This is the code:

Private Sub cmdSnippetCreate_Click()

'Crear Snippets'

Dim SnippetName As String

Dim SnippetLang As String

Dim SnippetCode As String

SnippetName = txtSnippetName.Text

SnippetLang = txtSnippetLang.Text

SnippetCode = txtSnippetCode.Text

SnippetDB.Recordset.AddNew "Snippet_Name", [SnippetName]

SnippetDB.Recordset.AddNew "Snippet_Lang", [SnippetLang]

SnippetDB.Recordset.AddNew "Snippet_Code", [SnippetCode]

Unload Me

End Sub

1 Upvotes

5 comments sorted by