Hi all, this is my problem:
- I have a form that read data from my “CLIENTI” table. The name of my customer is showed in a textBox.
- I’ve created a Macro where i get the current value of that textBox and I’m trying to pass that value to another form that is created using a Query.
So, my code so far:
Dim oForm As Object
Dim frm_container As Object
Dim FormModel2 As Object
Dim oCrrV As String
oForm = ThisComponent.Drawpage.Forms.getByName("MainForm")
Dim oPutField As Object
oPutField = oForm.getByName("frm1_tbox_Nome")
oCrrV = oPutField.getCurrentValue
frm_container = ThisDatabaseDocument.FormDocuments.getByName("testu")
frm_container.open
FormModel2 = frm_container.component.getDrawPage.getforms.getbyindex(0)
FormModel2.Filter = "(""RelationQuery"".""Nome Uomo"" like '%" & oCrrV & "%')"
FormModel2.ApplyFilter
FormModel2.reload()
My Query is called “RelationQuery” and it has 2 columns (calculated by the combination of a number of fields from different tables). As you can see in my code one column is called “Nome Uomo”.
This Macro is beign called by a button that should open the form and filter it with the data i want but it shows me always an error:
Error code: 1
firebird_sdbc error:
*Dynamic SQL Error
*SQL error code = -206
*Column unknown
*RelationQuery.Nome Uomo
*At line 1, column 321
caused by
‘isc_dsql_prepare’
Do you know where is the error?