Is there a limited to the amount of records VB can delete? I keep getting an error:
[Microsoft][ODBC Microsoft Access Driver]Query is too complex
This is my delete function:
Public Sub Delete_Records()
If Not (frmADO.PC.Recordset.EOF) Then
frmADO.PC.Recordset.MoveFirst
Do While Not (frmADO.PC.Recordset.EOF)
frmADO.PC.Recordset.Delete
frmADO.PC.Recordset.MoveNext
Loop
End If
End Sub
The error is always pointing to frmADO.PC.Recordset.Delete
Basically what I am doing with my code is setting the ADO control (PC) to the specified Query and stepping through all the records and deleting them.
Is there an easier/better way to delete all the records from a Access file?
Any help would be much appreciated.
[Microsoft][ODBC Microsoft Access Driver]Query is too complex
This is my delete function:
Public Sub Delete_Records()
If Not (frmADO.PC.Recordset.EOF) Then
frmADO.PC.Recordset.MoveFirst
Do While Not (frmADO.PC.Recordset.EOF)
frmADO.PC.Recordset.Delete
frmADO.PC.Recordset.MoveNext
Loop
End If
End Sub
The error is always pointing to frmADO.PC.Recordset.Delete
Basically what I am doing with my code is setting the ADO control (PC) to the specified Query and stepping through all the records and deleting them.
Is there an easier/better way to delete all the records from a Access file?
Any help would be much appreciated.