base - Load default form when opening database
Hi! How can I make Base open a specific form automatically every time I open an .odb file?
Thanks!
First time here? Check out the FAQ!
Hi! How can I make Base open a specific form automatically every time I open an .odb file?
Thanks!
here are a two macro's, the first covers your question, the other is optional
'===== attach to event "open document" that is: with opened document : tools > customise > events > open document
sub autoexec()
dim oController as object
oController = ThisDatabaseDocument.CurrentController
if Not oController.isConnected() Then oController.connect()
oController.loadComponent(com.sun.star.sdb.application.DatabaseObject.FORM,"frmMENU",FALSE)
end sub
'========= macro attached to a knob event 'mouse up' to open a form
sub OpenForm(oEvent as object)
dim oDoc as object
dim sTemp as string
oDoc = oEvent.source.model
sTemp = oDoc.getName() ' name of the knob is name of the form to open
ThisDatabaseDocument.FormDocuments.getByName(sTemp).open
exit sub
Thank you very much, I have it working!
Tiny typo: ThisDatabaseDocumentCurrentController should be ThisDatabaseDocument.CurrentController
Asked: 2020-12-14 07:04:24 +0100
Seen: 38 times
Last updated: Dec 14 '20
arabic language support [closed]
Any way to speed up database search? [closed]
Installation on Fedora 14 system fails. [closed]
converting perfect works data files [closed]
Where can I find sample databases for Base?
compatibility with microsoft access97 [closed]
How do you set up input for many-to-many intersections in Base? [closed]