Sam Summers
Registered User.
- Local time
- Today, 02:58
- Joined
- Sep 17, 2001
- Messages
- 939
I have a continuous form which displays various records of varying amounts.
The user double clicks on each record to carry out a task.
On double clicking on the last record the form closes with this code:
The only problem is that on double clicking any records between the first and last record brings up a blank form?
I'm obviously missing something as the code does the job apart from that.
Many thanks in advance
The user double clicks on each record to carry out a task.
On double clicking on the last record the form closes with this code:
Code:
Private Sub Form_DblClick(Cancel As Integer)
On Error GoTo Err_Form_DblClick
DoCmd.OpenForm "SelectAffected", acNormal, , "[HazardRef] = " & Me.HazardRef, acFormEdit
If Me.Form.CurrentRecord = Me.Form.RecordsetClone.RecordCount Then
DoCmd.Close acForm, "HazardList", acSaveYes
Else
DoCmd.GoToRecord , , acNext
End If
Exit_Form_DblClick:
Exit Sub
Err_Form_DblClick:
MsgBox Err.Description
Resume Exit_Form_DblClick
End Sub
The only problem is that on double clicking any records between the first and last record brings up a blank form?
I'm obviously missing something as the code does the job apart from that.
Many thanks in advance