Link to home
Start Free TrialLog in
Avatar of keneso
keneso

asked on

creating interface form

Hi,

I have created 3 tables, and the relative forms to add, edit, and view the data, I need to create a single interface, from which to open the 9 forms.
How can I achieve this?

Thank you.
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

No idea about OpenOffice, but Access has a 'Switchboard Wizard' where you can make a custom switchboard / main menu / whatever you want to call it, with nine buttons that will take you to your nine forms.  

The table 'Switchboard Items' will contain whatever selections you want on your 'Switchboard'.  In your case it will be nine records, with their respective form names you want them to open, and perhaps a tenth button for Close.

You could run this and use it as a model within OpenOffice.

Avatar of keneso
keneso

ASKER

Thanks, I'll look into it.
ASKER CERTIFIED SOLUTION
Avatar of pitonyak
pitonyak

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of keneso

ASKER

Thank you pitonyak, sorry for the delay.

I looked at the document, but being a total noob at this, I would need some guidance on how to use those macros.
I also added another macro

Sub onClickOpenForm ( oEvent as variant )
   OpenForm(oEvent, "Form Name")
End sub

Sub OpenForm( oEvent as variant, aFormName as string) as variant
  Dim args(1) As New com.sun.star.beans.PropertyValue
  Dim container as variant
  Dim oCon

  oCon =  oEvent.Source.Model.Parent.ActiveConnection
  container = oCon.Parent.DatabaseDocument.FormDocuments

  args(0).Name = "ActiveConnection"
  args(0).Value = oCon
  args(1).Name = "OpenMode"
  args(1).Value = "open"
  container.loadComponentFromURL(aFormName,"_blank",0,args())
End Sub

This demonstrates how to directly open a form given its name. I added this to AndrewBase.odt as well.

From where and how do you desire to run your script?

Avatar of keneso

ASKER

Thanks.

I'd like to do it from the Base document, as the opening window/interface.
Avatar of keneso

ASKER

Thank you all, and sorry for the delay.