A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

On Current Error



 
 
Thread Tools Display Modes
  #1  
Old April 1st, 2010, 03:28 PM posted to microsoft.public.access.forms
gagecres
external usenet poster
 
Posts: 36
Default On Current Error

I just made a couple of minor changes to my database and now I am getting
this message when I try to open my main form: "The expression On Current you
entered as the event property setting produced the following error: Return
without GoSub." The only changes I made were to move some buttons and text
fields around. I didn't even touch the code I had in On Current. This code
was working fine until I made these changes. Any idea of what I might have
done to cause this error?
  #2  
Old April 2nd, 2010, 04:36 AM posted to microsoft.public.access.forms
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default On Current Error

On Thu, 1 Apr 2010 07:28:02 -0700, gagecres
wrote:

You forgot to post the code in the OnCurrent event.

You can also test this by temporarily write:
Exit Sub
as the first line of the OnCurrent event.

-Tom.
Microsoft Access MVP


I just made a couple of minor changes to my database and now I am getting
this message when I try to open my main form: "The expression On Current you
entered as the event property setting produced the following error: Return
without GoSub." The only changes I made were to move some buttons and text
fields around. I didn't even touch the code I had in On Current. This code
was working fine until I made these changes. Any idea of what I might have
done to cause this error?

  #3  
Old April 2nd, 2010, 02:54 PM posted to microsoft.public.access.forms
gagecres
external usenet poster
 
Posts: 36
Default On Current Error

Here is the code:

Private Sub Form_Current()
If DCount("*", "Probate Notice Table") = 0 Then
Me.cmd_Prvw_PR_Ltrs.Enabled = False
Me.Command75.Enabled = False
Me.cmd_Pnt_Wksht.Enabled = False
Me.cmd_Del_Rec.Enabled = False
Me.cmd_View_by_county.Enabled = False
Else
Me.cmd_Pnt_Wksht.Enabled = True
Me.cmd_Del_Rec.Enabled = True
Me.cmd_View_by_county.Enabled = True
End If
End Sub

Here's a new twist. I cut this code from the program, then saved and closed
the database. Then I reopened it and pasted the code back into OnCurrent and
the error went away. The problem is, I emailed a copy of this database to
myself at home and when I tried to open it there I got the error again. This
is driving me crazy. Please help.

"Tom van Stiphout" wrote:

On Thu, 1 Apr 2010 07:28:02 -0700, gagecres
wrote:

You forgot to post the code in the OnCurrent event.

You can also test this by temporarily write:
Exit Sub
as the first line of the OnCurrent event.

-Tom.
Microsoft Access MVP


I just made a couple of minor changes to my database and now I am getting
this message when I try to open my main form: "The expression On Current you
entered as the event property setting produced the following error: Return
without GoSub." The only changes I made were to move some buttons and text
fields around. I didn't even touch the code I had in On Current. This code
was working fine until I made these changes. Any idea of what I might have
done to cause this error?

.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:04 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.