Hello, I have an ADODC on my form. I want to populate the RecordSource etc. through coding
i also want to be able to Add, Update and Delete records to it in code
This is what I have so far
But I keep getting errors on the bolded lines saying that Either BOF and EOF are true.VB Code:
Private conn As adoDB.Connection Private rs As adoDB.Recordset Private Sub cmdBack_Click() [b]adoDBHorse.Recordset.MovePrevious[/b] End Sub Private Sub cmdNext_Click() [b]adoDBHorse.Recordset.MoveNext[/b] End Sub Private Sub Form_Load() Set conn = New adoDB.Connection ' Point this to NorthWind.mdb sample database. conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & CurDir & "\ST.mdb" Set rs = New adoDB.Recordset rs.CursorLocation = adUseClient Set rs.ActiveConnection = conn rs.Properties("IRowsetIdentity").Value = True rs.Open "HorseDet", , adOpenKeyset, adLockOptimistic, adCmdTableDirect Set adoDBHorse.Recordset = rs [b]txtHorseName.DataField = adoDBHorse.Recordset("strHorseName")[/b] End Sub Private Sub txtHorseName_LostFocus() adoDBHorse.Recordset.AddNew End Sub![]()
How can I fix this ?




Reply With Quote