D
Dave
Thanks for all the help yesterday with the code below.
When I try to requery the subform "frmnewpartssubform" I get a runtime error
3246- Operation not supported in transactions.
When I manually type part numbers in I do not get the error and the subform
is required ok
Can any one help me solve this?
Dave
Private Sub partno_BeforeUpdate(Cancel As Integer)
If IsNull(DLookup("[IZPN]", "tblpartsdatabase", "[IZPN] = '" & Me.partno &
"'")) Then
If MsgBox("This is a New Part - Do You Wish To Add?", vbYesNo, "Project
Costing Database") = vbNo Then
Cancel = True
Me.Undo
Exit Sub
Else: CurrentDb.Execute ("INSERT INTO tblnewparts ( partno, xfile,
issue )" & "Values('" & Me.partno & "', '" & Forms!frmprojectstabbed.Form! _
xfile & "', '" & Forms!frmprojectstabbed.Form!issue & "');"),
dbFailOnError
Cancel = True
Me.Undo
Forms!frmprojectstabbed!frmnewpartssubform.Form.Requery
End If
End If
When I try to requery the subform "frmnewpartssubform" I get a runtime error
3246- Operation not supported in transactions.
When I manually type part numbers in I do not get the error and the subform
is required ok
Can any one help me solve this?
Dave
Private Sub partno_BeforeUpdate(Cancel As Integer)
If IsNull(DLookup("[IZPN]", "tblpartsdatabase", "[IZPN] = '" & Me.partno &
"'")) Then
If MsgBox("This is a New Part - Do You Wish To Add?", vbYesNo, "Project
Costing Database") = vbNo Then
Cancel = True
Me.Undo
Exit Sub
Else: CurrentDb.Execute ("INSERT INTO tblnewparts ( partno, xfile,
issue )" & "Values('" & Me.partno & "', '" & Forms!frmprojectstabbed.Form! _
xfile & "', '" & Forms!frmprojectstabbed.Form!issue & "');"),
dbFailOnError
Cancel = True
Me.Undo
Forms!frmprojectstabbed!frmnewpartssubform.Form.Requery
End If
End If