Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 5 Jahren, 3 Monaten
Letzter Beitrag:
vor 5 Jahren, 3 Monaten
Beteiligte Autoren:
Rudi Werner, Fabrice Harari, Al, Hartyshow, Ola

Paramters & Query's

Startbeitrag von Rudi Werner am 12.04.2013 10:26


I create a combo box wit a list based on a query

The query has one parameter.
But the parameter is not a exact value but the value of another field on the form !
i have tryed everything but i cannot give the value of that field to the parameter of the query ????
when i give a absolute value to the paramter it works great !!
But when i give it a variabele he dont find it ????

What am i doing wrong ??????


Re: Paramters & Query's

Hello Rudi

I appreciate that English is not your native language but correct spelling of Windev command verbs is vital when looking for help on the forum.

A search of this forum for "query parameter" turned up 238 messages and this one looks promising



von Al - am 12.04.2013 11:08

Re: Paramters & Query's


My appologies for my bad english spelling but ...
The article that was given me above is exactly what i am doing only :

i want that MySource.Param1 = a variabele or the value of another field on this form

When i use for example MySource.Param1 = '8' it works perfect

but when i use MySource.Param1 = EDT_param it doen not work
Seems that any field or variabele is knowing on this part of the code ???

von Rudi Werner - am 12.04.2013 11:23

Re: Paramters & Query's

Hi Rudi

You are leaving out some important information and the source of your problem is probably in it:
- what tool (windev, webdev, etc)
- what version
- if webdev, browser or server code
- and MOST IMPORTANTLY, show us your code and tell us WHERE it is !

In your case, I'm GUESSING that your MySource.Param1 = EDT_param is in yout combo INIT code... IF that is the case, don't look anywhere else, as this code is executed when the window opens, ie BEFORE the edit field has anything in it

Best regards

von Fabrice Harari - am 12.04.2013 13:25

Re: Paramters & Query's


Thanks for your help,

I use Windev 17 / and create a windows Exe

I add a Combo based on a query with parameter to a form

An indeed windev itself places the Mysource.param1 = "x" in the initialization of hte combo

But indeed at this point no variables are known !

Where do i need to place the Mysource.param1 code to get a result ???


von Rudi Werner - am 12.04.2013 13:48

Re: Paramters & Query's

Hi Rudi

try this:
in the exit code of the edit field, add a Executeprocess(ComboName, tainit)
That will reexecute the init code of the combo with the correct value now in the field

Best regards

von Fabrice Harari - am 12.04.2013 14:43

Re: Paramters & Query's

Hi Fabrice,

when i type the executeprocess command in the code editor
the combo is not in the autofill list when i type manually his name in the command

the command is :


when i run the program i get a error 'syntax 2' Variabele is not an object

what can that be ??

This problem is driving me nuts...

von Rudi Werner - am 12.04.2013 15:35

Re: Paramters & Query's

Hi Rudy

Where and how do you initialize/execute the query?
Where and how do you set the query parameters?
Have you noted what is the initialization sequence of your controls?
Are you sure the query has got its parameters before it is executed?
Make sure that the query will be re-executed after you have changed its parameters.

Personally I find combo boxes very awkward, limited in capabilities and generally just frustrating and do not use them except for some rare cases where the data is all known and fixed, so I cannot tell you more about them.

If I need to do lookups for file data, I always use separate windows with file or query based table control. Then I can freely do anything, including full maintenance of the file to be looked up.

In a query based table window I place the query initialization and execution in a separate local procedure, so that I can call it not only from the table control's init code but also from anywhere else in the window where needed, including in the exit code of any parameter setting control.


von Ola - am 12.04.2013 15:36

Re: Paramters & Query's

Use this :

{"REQ_YourRequest.YourParam"} = YourVariable


von Hartyshow - am 12.04.2013 23:57

Re: Paramters & Query's

Give it up !

Instead of using combo i make tables and look the file up that way !

thanks for the help !!

von Rudi Werner - am 13.04.2013 07:14

Re: Paramters & Query's

Hello Rudi

You never mentioned if the combobox was in a table or just a stand alone control on a window. The combobox control on a window works well, I use them extensively but I hand code them all. in a ListAdd() loop.
I have never had any luck getting them to work well in tables when they need to be filled with dynamic and like Ola I use popup windows instead of combo boxes in tables.


von Al - am 13.04.2013 08:16
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.