Hello Drew,

If I understand it correctly, I can use SingleSelectQueryAnalyzer to figure
out the parameter index after I get the following working:

oDoc = thiscomponent
oForm = oDoc.DrawPage.Forms(0)
REM oForm.ActiveCommand contains select * from trackdata where ("StartDate"
> ?)
REM Enumerate forms and controls.
For i = 0 To oform.getCount()-1
  x = oForm.getByIndex(i)

REM find out if it is a data aware control
    If x.supportsService("com.sun.star.form.DataAwareControlModel") Then
REM check if this is an unbound control
    If x.DataField = "" then
        if x.Name = "StartDate" then oForm.setDate(1, x.CurrentValue)
     End if
   End if
Next
oForm.reload
End Sub

Unfortunately I get an error with setDate (parameter not set). If I use
setObject there is no error, but I still get the Parameter Input dialog box.

Do you know what's wrong here?

Ferry



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to