| View previous topic :: View next topic |
| Author |
Message |
drobe011 Newbie

Joined: 06 Jan 2005 Posts: 3 Location: Raeford, NC
|
Posted: Thu Jan 06, 2005 6:40 pm Post subject: help retrieving current row in a form |
|
|
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 |
|
 |
drobe011 Newbie

Joined: 06 Jan 2005 Posts: 3 Location: Raeford, NC
|
Posted: Sat Jan 08, 2005 9:24 pm Post subject: I figured it out |
|
|
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 |
|
 |
|