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

help retrieving current row in a form

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


Joined: 06 Jan 2005
Posts: 3
Location: Raeford, NC

PostPosted: Thu Jan 06, 2005 6:40 pm    Post subject: help retrieving current row in a form Reply with quote

I am getting lost in the APIs on this.

I have a simple postgres datasource linked to a form that I am using to store astronomical data. My goal is to display a photo corresponding to a link stored in my database.

I can do it if I create a textbox with the datafield set to the datasource and then setting the imageURL of the image control with the text of the textbox. A very unnecessary step.

The question is, how do I reference the current row from the datasource in the form through Basic?

Thanks, Dave
Back to top
View user's profile Send private message Visit poster's website
drobe011
Newbie
Newbie


Joined: 06 Jan 2005
Posts: 3
Location: Raeford, NC

PostPosted: Sat Jan 08, 2005 9:24 pm    Post subject: I figured it out Reply with quote

Very simple:

Dim Doc As Object
Dim Form As Object
Dim Column as String

Doc = StarDesktop.CurrentComponent
Form = Doc.DrawPage.Forms.GetByIndex(0)
Column = Form.getString(1) 'returns the first column of the data

I was trying to go through all of the services, and I tried getString(#) on a whim and it worked. It helped that I was looking at an example in java.
Back to top
View user's profile Send private message Visit poster's website
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