Hi, I am beginner in Visual Basic. I am doing a simple ADODC project using MS Acces. In that when I add new record to the database it gives me error 'Object Required'.
I tried the same code on different form but it is giving me same error. All the connections seem ok as the data is properly fetched at startup and ADODC control works fine navigating through db.
Please help me. My code is as follows...
Private Sub Form_Load()<br /> Set adoRecordset = New Recordset <br /> Private Sub cmdAdd_Click() <br /> On Error GoTo ErrLabel<br /> adoRecordset.AddNew<br /> Exit Sub <br /> ErrLabel:<br /> MsgBox Err.Description<br /> End Sub
hello I think weare working
hello I think weare working on same kind of projects and can share our ideas and improv our projects this is my email adress if you like to contact "M_Naveed_09@yahoo.com"
i'm also beginner
Bye
___
{N}
Yes you can
Actually, to use the ADO data control to add a new record you just need a command button
that executes the following statement:
adodc1.Recordset.AddNew
where adodc1 is the name of your control.
Andy.
To use the ADO data control
To use the ADO data control to add a new record, set its EOFAction property to adDoAddNew.
Then you can press the last record button >| followed by > (next record) to start a new record.
You can either use the ADO data control or write everything yourself in ADO. Your code indicates
that you're trying to combine both of these methods. I suspect it is possible to manipulate the
recordSource of the ADO data control, but am not sure how.
Post new comment