Return without GoSub

K

Karin

Hi, (Sorry, I also posted this in the reports section on accident.)
I have a bunch of command buttons on a switchboard, most of which run
either queries or reports. I have been slowly working on getting ready to
split the database, but have not yet done so. I did do a few things as
suggested in this site
http://www.accessmvp.com/TWickerath/articles/multiuser.htm. ; Whatever I did
has resulted in the Return withoutGoSub for every button on the form. I can
run the individual queries and reports without any problem, just can't run
them from the button. Create new button, no problem, but it won't run - same
error. Any suggestions for what I screwed up? TIA! Karin
 
D

Dirk Goldgar

Karin said:
Hi, (Sorry, I also posted this in the reports section on accident.)
I have a bunch of command buttons on a switchboard, most of which run
either queries or reports. I have been slowly working on getting ready to
split the database, but have not yet done so. I did do a few things as
suggested in this site
http://www.accessmvp.com/TWickerath/articles/multiuser.htm. ; Whatever I
did
has resulted in the Return withoutGoSub for every button on the form. I
can
run the individual queries and reports without any problem, just can't run
them from the button. Create new button, no problem, but it won't run -
same
error. Any suggestions for what I screwed up? TIA! Karin


I don't know what's going on, but maybe if you post the complete code from
the switchboard's module, from the very first line to the last, something
will become evident.
 
P

Pete D.

Did you happen to rename the table or anything else that was called
switchboard?
 
K

Ken Sheridan

Karin:

Sound like you've got one or more Return statements without corresponding
GoSub statements somewhere in the switchboard form's module, or in routines
called from within the module. In VBA branching to subroutines, common in
the old Basic days, is nowadays not used a lot, current programming practice
tending to rely on the flow of the logic, so I'm surprised if it is used by
the switchboard manager when generating code. Switchboard forms operate in
an unusual way, however, storing parameters in a table and using these to
layout the form and execute actions at runtime. Buttons use a generic Click
handling procedure rather than individual event procedures per button.

You could try and debug the form's module, but you'd probably find it easier
to delete and rebuild the switchboard from scratch. Alternatively you could
design your own form to act as the application's switchboard, adding buttons
as appropriate and entering code in their Click event procedures (the button
wizard will handle most common events, like opening forms, reports etc, and
generate the code for you). While the switchboard manager is a cheap and
cheerful way of doing it, most of us prefer the hand-crafted approach, which
allows you to design a form in your 'house style' rather than accepting the
standard switchboard layout.

Ken Sheridan
Stafford, England
 
K

Karin

Thanks, all, for support.

Luckily I had a backup and I reverted to where I started and I've been
slowly trying to recreate what happened. I've been following various
directions through the website below and also Allen Browne, which tells me to
turn off Name Auto Correct. Doing this seems to have caused a breakdown
resulting in the error message. I guess I'll skip this step. :)
 
K

Karin

I should also tell you I'm in Access 2000

Karin said:
Thanks, all, for support.

Luckily I had a backup and I reverted to where I started and I've been
slowly trying to recreate what happened. I've been following various
directions through the website below and also Allen Browne, which tells me to
turn off Name Auto Correct. Doing this seems to have caused a breakdown
resulting in the error message. I guess I'll skip this step. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top