I
Infocore
I've tried to research other posts on the this topic but can't find
one that meets my situation.
I have a form and subform. The subform is a continuous form. Its
properties are set to AllowAdditions = False
AllowEdits = True
AllowDelete = True
After a user enters the parent information there is a button to click
that gets the children records. The button that runs this is actually
on the subform itself. When clicked, an append query appends 5 child
records for this parent and requries the subform. The user now sees
five child records that are partly filled in and they can enter the
rest of the fields.
If Me.Recordset.RecordCount > 0 Then
MsgBox "Criterion has already been retrieved.", vbInformation,
"Get Criterion Error"
Else
DoCmd.SetWarnings False
DoCmd.OpenQuery "DAQ_Criterion", acViewNormal
Me.Requery
DoCmd.SetWarnings True
End If
The code basically works except that every so often I get a No Current
Record error. I can't seem to trap this error either. When the error
appears and you click ok, the rest of the code still runs and the the
records are added and the form is required.
Any idea.
one that meets my situation.
I have a form and subform. The subform is a continuous form. Its
properties are set to AllowAdditions = False
AllowEdits = True
AllowDelete = True
After a user enters the parent information there is a button to click
that gets the children records. The button that runs this is actually
on the subform itself. When clicked, an append query appends 5 child
records for this parent and requries the subform. The user now sees
five child records that are partly filled in and they can enter the
rest of the fields.
If Me.Recordset.RecordCount > 0 Then
MsgBox "Criterion has already been retrieved.", vbInformation,
"Get Criterion Error"
Else
DoCmd.SetWarnings False
DoCmd.OpenQuery "DAQ_Criterion", acViewNormal
Me.Requery
DoCmd.SetWarnings True
End If
The code basically works except that every so often I get a No Current
Record error. I can't seem to trap this error either. When the error
appears and you click ok, the rest of the code still runs and the the
records are added and the form is required.
Any idea.