I have to maintain a FPD26 system that is slowly being converted to VFP7. I have not looked at List Box popups in FPD26 in sometime, so I'm hoping that someone else's memory is better than mine!
The listbox popup has 4 static items in the list (entered in the screen designer). It is using the list box's When function by returning .t. or .f. depending on if the user is editing or not (the value of m.criteria determines this). I need to be able to change the items in the listbox to restrict the user to only 1 or 2 of the static items if the value in another listbox popop (m.pol_repfrm) on the same screen is a certain value. How to do this? In what method of the FPD26 screen do I put the code to change the items in the listbox? I need to change it after the user selects an item in the m.pol_repfrm GET field.
It's been too long since I did this in FPD26! Here is the code from the .spr that creates the listbox and also the listbox that holds the reportform choice (m.pol_repfrm):
@ 15,3 GET m.pol_repfrm ;
PICTURE "@^ Policy Summary;Policy Detail;Profiles-Policy;Profiles-Standard;Profiles-Contract;Mailing Labels;Laser Labels" ;
SIZE 3,20 ;
DEFAULT "Policy Summary" ;
VALID _0rt0zsap0()
@ 15,25 GET m.whatorder ;
PICTURE "@^ NAME;POLICY#;EFFECTIVE;EXPIRATION" ;
SIZE 3,14 ;
DEFAULT "NAME" ;
WHEN m.criteria
FUNCTION _0rt0zsap0
#REGION 1
IF m.pol_repfrm = "Policy Summary"
pol_group = ' '
pol_group(1) = 'COMPANY'
SHOW GETS
ELSE
SHOW GETS OFF
ENDIF
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"