OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Can't work out how to create macro to do really basic things

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
herseem
Newbie
Newbie


Joined: 01 Jul 2009
Posts: 2
Location: Luton, UK

PostPosted: Wed Jul 01, 2009 10:47 am    Post subject: Can't work out how to create macro to do really basic things Reply with quote

I've only just started dabbling in macros in OO (3.1) to use with Base. I can't seem to find out how to create simple macros to do two basic things:

1) From a button on a form, how do I create a macro that will call another form? eg, from a 'task maintenance' form, I want to have a button (or even a menu item) that will invoke the 'project area maintenance' form. I know how to create the button, and that I have to select an appropriate macro to put in the appropriate section on the control dialog. I have worked out to how get into macro editing - but there seem to be no prompts anywhere that enable me to select operations I can perform or objects to perform them on. I've looked through some documentation of all the available valid operations and none of them seem to get me any closer to achieving what I want to do.

2) On my 'task maintenance' file I have a free-format memo field to record events that occur in the history of executing that task. On my 'task maintenance' screen which is in table format, when I select a particular record I want the contents of that memo field to be loaded into a separate text field to make it easier to read and update, and then when I move focus away from it to update the record from whence the contents originally came. But I can't seem to find the relevant syntax of how to move data from one field in a file to a field on a form and vice versa, and again I can't seem to find a way of prompting that information out of available commands or objects.

My background is that I've been programming from home computers to IBM AS/400 both as an amateur and professionally for 30 years now, on and off, and I've previously done exactly this before using macros in Microsoft Access approximately 10 years ago. Although I have not got into Visual Basic before, I don't think I'm particularly dumb - I just can't seem to find the relevant documentation or built in assistance to do what was considerably easier to achieve in microsoft access, which seemed to be particularly good at giving you prompts with lists of things you could do and objects you could do them with and the range of available options.

I know I may be looking at a gift horse in the mouth given the price of OO, but I'd really appreciate a few pointers either to find out how to invoke built-in prompts or documentation that will lead me in the right direction. Ideally, I'd like to know not just how to do those things, but how to FIND OUT how I can achieve them. Thanks in anticipation.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Wed Jul 01, 2009 11:26 am    Post subject: Reply with quote

IMHO, the database in a single file is broken in too many ways. It has only disadvantages despite it's single-fileness.
Almost anything in OOo has an URL. But embedded forms and reports don't.
Despite the tons of form-loader macros and the well known switchboard extension, I use to recommend stand-alone documents as form containers: http://user.services.openoffice.org/en/forum/viewtopic.php?f=39&t=19445
Another way to navigate logical forms: Wrap several of them in a single document, separate them by page breaks (Writer) or sheets (Calc), connect them by hyperlinks or hyperlink-buttons, so a link scrolls/jumps to another form rather than loading a complete document.

In version 3.1 they introduced some new interface to load forms and reports more easily and reliably, but I don't care anymore.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
herseem
Newbie
Newbie


Joined: 01 Jul 2009
Posts: 2
Location: Luton, UK

PostPosted: Wed Jul 01, 2009 12:02 pm    Post subject: Reply with quote

Thanks, have read your article. It's put me right off using Base for this project at all. It seems to confirm my mounting suspicions that as a robust integrated product that Base is not at a comparable stage of development to Calc and Writer and is a long way short of where even Access was 10 years ago. This wasn't helped by crashing spectacularly and losing all the development work I've done today, just after I'd posted my message in this forum!
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Wed Jul 01, 2009 12:42 pm    Post subject: Reply with quote

As a complement to Calc and Writer, Base allows you to do really amazing things in Calc and in Writer (or even Impress).

You can not build up any database application without a very huge coding effort on a highly confusing API. But even with perfect macros for perfect convenience, the embedded HSQLDB remains slow, unsafe, insecure, static and proprietary. A caricature of a database.

Currently I have my first macro-free embedded HSQLDB in use.
- It's nothing too important, feeding Calc's scenarios, pivot tables and charts with row sets without triggering any financal transactions. A game about health insurances.
- It's tiny. May be 8,000 rows in 6 tables plus some helper tables for filters and man-to-many.
- It's fairly usable with a some extra clicks and window-toggling but I would not proudly present this thing to others.
- I do run daily backups.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group