[Solved] How to find selected record in a subform?

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

[Solved] How to find selected record in a subform?

Post by ptoye »

I have a fairly simple form with a sub-form. The main form has a query to display a number of records, and the subform extracts some of those records into controls for editing etc.

What I want to do it to put buttons on the form to perform various operations. But I can't find out how to get to the selected record. XRayTool doesn't give any properties or methods that I can see which help me. Am I missing something trivial, or is this a really difficult thing to ask?
Last edited by Hagar Delest on Fri Apr 06, 2012 12:23 am, edited 1 time in total.
Reason: tagged [Solved].
Peter
OO 4.1.1 on MS Windows 7 64-bit
RPG
Volunteer
Posts: 2261
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: How to find selected record in a subform?

Post by RPG »

Hello

Your question is not clear but I assume you mean a record in a gridcontrol. Even if you work with a gridcontrol there is only one current record in your form. You can only access the current record in your form.

Romke
LibreOffice 24.8.5.2 on openSUSE Leap 15.6
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

Re: How to find selected record in a subform?

Post by ptoye »

Of course you can. I was as thinking I should be able to get the record selected in the subform query. But if course I can't. Thanks. Silly me.
Peter
OO 4.1.1 on MS Windows 7 64-bit
RPG
Volunteer
Posts: 2261
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: How to find selected record in a subform?

Post by RPG »

Hello

I do not understand your question but maybe this can help you.
http://user.services.openoffice.org/en/ ... ol#p109535
When you are not a programmer it is better to avoid macros and use the tutorials and examples you can find here:
http://user.services.openoffice.org/en/ ... m.php?f=83

Romke
LibreOffice 24.8.5.2 on openSUSE Leap 15.6
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

Re: How to find selected record in a subform?

Post by ptoye »

I was a programmer and IT consultant for 35 years! But as your previous comment helped me a bit I've solved that problem. And now have others :(
Peter
OO 4.1.1 on MS Windows 7 64-bit
Post Reply