I have set up a macro to run when my database is opened.
SUB OpenFormsOnStart()
DIM oController AS OBJECT
DIM oForm AS OBJECT
oController = ThisDatabaseDocument.CurrentController
if Not oController.isConnected() Then oController.connect()
WAIT 1000
ThisDatabaseDocument.FormDocuments.getByName("fmSwitchboard").open
END SUB
I found the following solution to resize a form:
This opens a switchboard form. All going well so far. I would then like to size the form.
I added the RESIZE line:
SUB OpenFormsOnStart()
DIM oController AS OBJECT
DIM oForm AS OBJECT
oController = ThisDatabaseDocument.CurrentController
if Not oController.isConnected() Then oController.connect()
WAIT 1000
ThisDatabaseDocument.FormDocuments.getByName("fmSwitchboard").open
RESIZE(500,500)
END SUB
What happens is the switchboard form opens, but the database main window is shrunk to the size specified in RESIZE.
I have tried getting the focus onto the switchboard form with no success. I would be very grateful for any help with this.
Thank you very much!