Ben,
This is the on exit EEP that I use on my variable edit for vSelName:
IF vSelName IS NOT NULL THEN
SET VAR vWhere_Clause = 'WHERE Full_Name CONTAINS .vSelName'
IF vAnd_Clause IS NULL THEN
SET VAR vAnd_Clause = ' '
ENDIF
IF vCond_Clause IS NULL THEN
SET VAR vCond_Clause = ' '
ENDIF
PROPERTY IDVLB_All_Names LookUpWhereClause '&vWhere_Clause &vAnd_Clause
&vCond_Clause &vSort_Clause'
PROPERTY IDVLB_All_Names REFRESHLIST 'TRUE'
PROPERTY IDCB_First_Name REFRESHLIST 'TRUE'
PROPERTY IDCB_Main_Name REFRESHLIST 'TRUE'
PROPERTY IDVLB_All_Names SET_FOCUS 'TRUE'
ENDIF
RETURN
vAnd_Clause, vCond_Clause & vSort_Clause come from other controls;
IDVLB_All_Names is the DB (in my case) listbox;
IDCB_First_Name & IDCB_Main_Name are DB combo boxes for further refinement
(if required) of the selection once vSelName has a few letters in it.
As the lookup table for the listbox is approaching 40,000 items I had to
limit it to one default row in the lookup definition otherwise it took too
long to load when opening the form. The property "LookUpWhereClause" resets
that once the form is open and the variable gets some letters.
The form is based on a dummy table which never gets updated and I use the
IdNum that is returned from the listbox in further processing.
Regards,
Alastair.
----- Original Message -----
From: "Ben Fogt" <[EMAIL PROTECTED]>
To: "RBG7-L Mailing List" <[email protected]>
Sent: Wednesday, March 30, 2005 5:42 AM
Subject: [RBG7-L] - WHERE Property in Variable List Box
> I want to have a variable list box on a form that changes based on other
> variables on the same form.
>
> One way I thought to do this was a use a "Refresh" button that would set a
> text variable that would be the text string and then use the Property
> command to set the where clause on the variable list box. It looks like
> this isn't updateable in
>
> Another idea was to assign the where clause to my variable (&vwhere) and
use
> PROPERTY to refresh the list. That doesn't work, either.
>
> I think I'll have to use a second form that will contain a scrolling
region
> but I'd rather keep it clean and on a single form. Any suggestions?
>
> Ben Fogt
>