return to previous form (1 Viewer)

pbuethe

Returning User
Local time
Yesterday, 19:23
Joined
Apr 9, 2002
Messages
210
I have a form which I might get to from any of several other forms. How can I get it to return to the previous form when I click the close button? Now it is only returning to the main switchboard.

Thanks for any ideas.
 

Alexandre

Registered User.
Local time
Today, 06:23
Joined
Feb 22, 2001
Messages
794
Use the OpenArgs property of the form you are opening to store the name of the form you are coming from (have a look t access help on OpenArgs for more info).

However, it is generally more efficient not to open and shut and re-open forms. You should consider either using popup forms (eventually modal) which will let go back to the underneath form once closed, or eventually hidind/showing your forms (visible property)
 

pbuethe

Returning User
Local time
Yesterday, 19:23
Joined
Apr 9, 2002
Messages
210
Thanks Alexandre, I tried setting the form to Popup, and removed the macro on the close button which closed the form and opened the switchboard. Now it is returning to the previous form, except when I want to return to the switchboard! The switchboard should lead to the (now popup) form, by clicking a button "Data Entry". Now when I go from the switchboard to the popup form and close, it gives me the database window, with the switchboard form highlighted in the Forms window.
 

Alexandre

Registered User.
Local time
Today, 06:23
Joined
Feb 22, 2001
Messages
794
Well, there would be workarounds around this but before getting further I'd like to understand how you get such behaviour. Are you using the switchboard created by the Wizard or a custom one? The one created through the wizard will not close on opening a form (pop-up or not). At least, I made tests and it didn't.
Any idea about what you are doing that may cause that?
 
Last edited:

pbuethe

Returning User
Local time
Yesterday, 19:23
Joined
Apr 9, 2002
Messages
210
I had a custom switchboard (i.e. just a form that I put buttons on). After reading your response I tried creating a switchboard with the Switchboard Manager. However I then tried editing the SB form in Design View. I accidentally deleted a field. Then I deleted the SB form in order to start again. It was still in the SB Manager but I could not get the form to appear again. What can I do? Thanks for your help.
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:23
Joined
Feb 19, 2002
Messages
43,275
Rename the [Switchboard Items] table and delete the Switchboard form. Then when you run the switchboard manager, both will be recreated. No need to enter any data. Exit from the switchboard manager and delete the empty [Switchboard Items] table and rename your saved version and you'll be back in business.
 

pbuethe

Returning User
Local time
Yesterday, 19:23
Joined
Apr 9, 2002
Messages
210
Thanks, Pat! That did the trick. Also, thanks Alexandre for steering me to the Switchboard Manager. It makes it much easier to create a switchboard and get it to work the right way. I had pictures on the buttons on my custom switchboard though, but I guess I can do without those.

Thanks again! :D
 

Users who are viewing this thread

Top Bottom