MikeLong
asked on
"Run Time Error 3 - Return with No GoSub" on With
I get Error box:
"Run Time Error 3 - Return with No GoSub"
When I click "Debug" it displays the OnCurrent code at:
With Me![InstrumentServices Query Subform].Form
No "Return" - no "GoSub" - why?
P.S. This only happen the FIRST time I open this form (after opening DB)
"Run Time Error 3 - Return with No GoSub"
When I click "Debug" it displays the OnCurrent code at:
With Me![InstrumentServices Query Subform].Form
No "Return" - no "GoSub" - why?
P.S. This only happen the FIRST time I open this form (after opening DB)
Private Sub Form_Current()
With Me![StudentInstrument Subform].Form
.Visible = (.RecordsetClone.RecordCount > 0)
End With
With Me![InstrumentServices Query Subform].Form
.Visible = (.RecordsetClone.RecordCount > 0)
End With
' With Me![InstrumentComments Subform].Form
' .Visible = (.RecordsetClone.RecordCount > 0)
' End With
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, I'll try "<> 0" Monday when I go back to work.
I'm guessing, now, that the problem lies with the fact that this is running under Office 2007, but it's an Access 2000 DB so I could do development at home if I needed to. (I'm off sick today (Friday). Otherwise I'd have the .mdb at home on my pen drive.)
I'm guessing, now, that the problem lies with the fact that this is running under Office 2007, but it's an Access 2000 DB so I could do development at home if I needed to. (I'm off sick today (Friday). Otherwise I'd have the .mdb at home on my pen drive.)
ASKER
Thanks, "<> 0" did the trick. Problem solved. Or perhaps, should I say, "worked around" as the RecordCount must be being reported as LESS THAN ZERO!
The RecordCount property is really only reliable if you test for Zero, or do a MoveLast and then get the Count.
mx
mx
If you Debug>>Compile .... do you get any errors?
mx