Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / June 2006

Tip: Looking for answers? Try searching our database.

Return without GoSub?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SteveC - 16 Jun 2006 18:51 GMT
I keep having to go back to a backup database whenever I edit one form
because I get an error that says there is a return without GoSub

The highlighted line is the If Forms line.  I cannot figure out what
happens.

If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> conObjStateClosed
Then
       If Forms(strFormName).CurrentView <> conDesignView Then
           IsLoaded = True
       End If
   End If

End Function
Klatuu - 16 Jun 2006 21:09 GMT
It appears you are trying to determine whether a form is open or not.  I am
concerned about the way you are using IsLoaded.  IsLoaded is an AccessObject
property.  You many be confusing Access.  It looks like you have a function
named IsLoaded.

If you want to determine if a form is loaded and not in designview, first
change the name of your function to something like IsFormLoaded and try it
this way:

If CurrentProject.AllForms(strFormName).IsLoaded And
CurrentProject.AllForms(strFormName).CurrentView <> acCurViewDesign Then
   IsFormLoaded = True
End If

> I keep having to go back to a backup database whenever I edit one form
> because I get an error that says there is a return without GoSub
[quoted text clipped - 10 lines]
>
> End Function
SteveC - 17 Jun 2006 21:32 GMT
Thanks
> It appears you are trying to determine whether a form is open or not.  I
> am
[quoted text clipped - 28 lines]
>>
>> End Function
SteveC - 19 Jun 2006 16:07 GMT
It seems that this comes and goes.  When I repair the database, it goes away
for a while so I have left it alone for the timebeing.  I have filed away
your help to use later.  Thanks again!
> It appears you are trying to determine whether a form is open or not.  I
> am
[quoted text clipped - 28 lines]
>>
>> End Function
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.