Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ok, work this one out!!
Message
 
 
To
19/02/2002 11:56:26
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00621981
Message ID:
00622019
Views:
34
Try to assign empty string before changing RowSource. Also add a space after DESC, word. I also usually add spaces before ; for readability...

>OK, BTW it's intermittent !!!
>
>
LOCAL lcOrder, llDescending
>llDescending = (this.opgOrder.Value = 2)
>lcOrder = UPPER(ALLTRIM(this.cboOrder.Value)) + " "
>
>*Check if Client Surname/Forename is picked
>DO CASE
>	*Surname, then Forename
>	CASE lcOrder = "SURFOR "
>		lcOrder = "Cl_Sname " + IIF(llDescending, "DESC,", ",") + "Cl_Fname "
>	*Forename, then Surname
>	CASE lcOrder = "FORSUR "
>		lcOrder = "Cl_Fname " + IIF(llDescending, "DESC,", ",") + "Cl_Sname "
>	OTHERWISE
>		lcOrder = lcOrder + IIF(llDescending, "DESC", "")
>ENDCASE
>
>*Setup RowSource
>this.pgfPageFrame.Page1.lstIntray.RowSource = ;
>	"SELECT Ml_DateTime,ALLTRIM(Cl_Fname)+' '+ALLTRIM(Cl_Sname), "+;
>	"Ml_Content,Ml_Ref "+;
>	"FROM Ccmsmail "+;
>	"LEFT JOIN Client "+;
>	"ON Ccmsmail.Cl_Ref = Client.Cl_Ref "+;
>	"WHERE Ml_To = gu_User "+;
>	"AND !Ml_Sent "+;
>	"ORDER BY " + lcOrder + ;
>	" INTO CURSOR recInTray"
>this.pgfPageFrame.Page2.lstOutTray.RowSource = ;
>	"SELECT Ml_DateTime,ALLTRIM(Cl_Fname)+' '+ALLTRIM(Cl_Sname), "+;
>	"Ml_Content,Ml_Ref "+;
>	"FROM Ccmsmail "+;
>	"LEFT JOIN Client "+;
>	"ON Ccmsmail.Cl_Ref = Client.Cl_Ref "+;
>	"WHERE Ml_From = gu_User "+;
>	"AND Ml_Sent "+;
>	"ORDER BY " + lcOrder + ;
>	" INTO CURSOR recOutTray"
>	
>*Refresh
>this.RefreshLists()
>
>
>And here is refreshlists:
>
>
WITH thisForm.pgfPageFrame
>	.Page1.lstInTray.Requery()
>	.Page2.lstOutTray.Requery()
>ENDWITH
>
>*Run InteractiveChange on the currently active list
>DO CASE
>	CASE this.pgfPageFrame.ActivePage = 1
>		this.pgfPageFrame.Page1.lstInTray.InteractiveChange()
>	CASE this.pgfPageFrame.ActivePage = 2
>		this.pgfPageFrame.Page2.lstOutTray.InteractiveChange()
>ENDCASE
>		
>thisForm.Refresh()
>
>
>Kev
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform