Link to home
Start Free TrialLog in
Avatar of eliwil
eliwil

asked on

Run-time error 3075: Reserved Error

I'm stumped. I'm getting this error Run-time error 3075: Reserved Error. Debug identifies the If line in the following code:

Private Sub Form_AfterUpdate()
  Dim strQryName As String
  strQryName = "qupdTxSchRecd"

>If Me.cboUbTxPrQtyRcd = Forms!frmTxRecd!fsubTxSchUnRecd2.Form!cboUbTxPrQtySch Then
    DoCmd.SetWarnings False
    DoCmd.OpenQuery strQryName, acNormal, acEdit
    Me.Parent.fsubTxSchUnRecd2.Requery
    Me.Parent.fsubTxSchUnRecd2.SetFocus
    DoCmd.SetWarnings True
  End If
 
End Sub

The control source for Forms!frmTxRecd!fsubTxSchUnRecd2.Form!cboUbTxPrQtySch is
=nz(DSum("lngShpQty","qsubTxSchActive","lngTxID=" & Forms!frmTxRecd!fsubTxSchUnRecd2.Form!txtUbTxID & " AND lngProdID=" & Forms!frmTxRecd!fsubTxSchUnRecd2.Form!txtUbProdID & " AND dtmCncld Is Null"),0)

Me.cboUbTxPrQtyRcd
=DCount("lngProdSnID","tblProdSn","lngTxRecdId =" & Forms!frmTxRecd!fsubProdSN.Form!cboTxRecdID)

The error only triggers when there are no records in the subform. Can you see where the problem might be?

E
ASKER CERTIFIED SOLUTION
Avatar of jefftwilley
jefftwilley
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of eliwil
eliwil

ASKER

When I use the IF above I get the following:
Run-time error -2147352567 (80020009) Reserved Error and Error in the control itself.

Again, errors only happen when the subform has no records.

E
Try the Decompile ... I have seen it fix many a Reserved Error.  It's simple and you may get lucky.

mx
then Sloath has you covered
lol
Always good advice.

Time for zzzz's here. I'm out
J
Time for '24' ... I'm out for an hour !!!

mx
U have 2 subforms. Which one has no records in?

The line below could be causing problems if there are no records in fsubProdSN:

DCount("lngProdSnID","tblProdSn","lngTxRecdId =" & Forms!frmTxRecd!fsubProdSN.Form!cboTxRecdID)
Avatar of eliwil

ASKER

DatabaseMX:, Did the above. Still get the same error.
Avatar of eliwil

ASKER

Did the decompile and still get error.
With Nz get Run-time error -2147352567 (80020009) Reserved Error and Error in the control itself.
With recordsetclone approach above get the Run-time error 3075: Reserved Error
U have 2 subforms. Which one has no records in?

The line below could be causing problems if there are no records in fsubProdSN:

DCount("lngProdSnID","tblProdSn","lngTxRecdId =" & Forms!frmTxRecd!fsubProdSN.Form!cboTxRecdID)
So what solved it in the end?
Yes ... what did ??  Was it just evil forces from outer space ?

mx
The Force Padawan...


:-)
Only Da Sloath Knows For Sure !!! *** !!! :-)
Avatar of eliwil

ASKER

I ditched the forms in this version of the database and went back to a previous version to work with the form and subforms. Yahoo, no run time errors! Just needed a few tweaks to get the result I needed and imported the revised form and subs into the current database.

Thanks for all the help!
Avatar of eliwil

ASKER

It was either those evil forces from outerspace or gremlins. I'm leaning toward the outerspace explanation myself ;-]

E