Hi All
I am using MS ACCESS 2003 and VB version 6.0.I made a Blank database in ACCESS with a table having fields Username & Password.
My VB application consists of 2 textboxes and a command button.
I established the connection using "Microsoft.Jet.OLEDB.4.0"(coz i tried first 3.51 but it wasnt working).
In the RECORDSOURCE Tab , I specified the CommandType as "adcmdTable" and selected my fresh table(Having no data).
For filling my fresh table:
I tried the following code in the Command1_Click()
Private Sub Command1_Click()
With Adodc1.Recordset
.AddNew
.Fields(0) = Text1.Text
.Fields(1) = Text2.Text
.Update
End With
End Sub
Even I tried :(Just to verify)
Private Sub Command1_Click()
With Adodc1.Recordset
.AddNew
.Fields("Username") = Text1.Text
.Fields("Password") = Text2.Text
.Update
End With
End Sub
I am getting the following error:
Run time error-91: Object variable or with block not set..
I tried every approach I was able to find but no use.
Please help me out.