Ask Your Question

switchboard used as standalone then error --Basic runtime error, object variable not set

asked 2016-09-06 20:20:29 +0200

koolninja gravatar image

My form name Issue

i have created switchboard with button with micro below

Sub Issue const sNewDocumentName="Issue" oNewFormDocument=ThisDatabaseDocument.FormDocuments.getbyname(sNewDocumentName).open End Sub

its work ok but when this switchboard used as standalone then error --Basic runtime error, object variable not set

how to overcome this

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-09-06 22:42:22 +0200

Ratslinger gravatar image

When you move to standalone forms you have to play by their rules. Macro code does not always work as it did within Base. Not using switchboard or standalone forms, a brief reading showed how to overcome your problem. When using standalone forms the open you are using doesn't know where the document is located - you are outside of Base so to speak. From this post (click here) the normal opening of another form is with a specific setup of a push button. The post does mention another way - through URL.

I believe your wanting to open another form using a button doesn't require any code. From the mentioned post:

Place a button to open the form somewhere, modify the Action on General TAB to open document/web page and select the document to open by clicking on the three little buttons next to URL.
edit flag offensive delete link more


thanks for simple way to solution..

koolninja gravatar imagekoolninja ( 2016-09-07 12:39:37 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-09-06 20:20:29 +0200

Seen: 83 times

Last updated: Sep 06 '16