Thanks for helping.
I would like to make more clear my problem so you can help in better way.
1) Form containing a new button.If you have entered a record and want to add more then click on this button it will valid the entry if o.k then allow another record else give a error messege. It is working fine only problem is that form on load I have to move to a new record.
2) If after entering a new record someone click on next button it allow without validation.
I want to stop this with following piece of code, But not working.
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "select * from certf_det", CurrentProject.Connection, adOpenDynamic, adLockReadOnly
If rs.EOF Then
MsgBox "you are at the last record"
Form.AllowAdditions = False
Exit Sub
Else
DoCmd.GoToRecord , , acNext
End If
I hope you will help me to come out this problem. I have been stucked here from last three day.