GoSub Errors

  • Thread starter Thread starter roccogrand
  • Start date Start date
R

roccogrand

Why does this Click event throw a "Return without GoSub" error in Access 12?


Private Sub cmdCountBusinesses_Click()
DoCmd.Requery

nRecords = DCount("*", "qryClassBusiness")
MsgBox "There are " & nRecords & " Business Class members.", vbOKOnly

End Sub


I created the routine in Access 12 and then moved it to another machine. I
then brought it back to the original machine and now it throws this error and
does not display the calculated results. Interestingly, the object library
references are the same in both the original database and the database
brought back to the original PC.

The only thing that I can think of is that the second PC does not have the
August and November hotfixes. Could that be the problem?
 
What are you requerying?

If it's a form, use:

Me.Requery

a combo or list box:

Me.ComboName.Requery
 
Thanks Arvin.

That worked but why does the DoCmd work in the original database but not
after the roundtrip? Are there other gotchas like this?

Thanks again, David
 
Back
Top