thisform._switchview("Inbox")When you first launch the form, the code in _switchview works beautifully. The cursor is created, the first column is dynamically evaluated and the column uses either an image control or a textbox depending on the value of the first field in the cursor.
this.LockScreen = .T. DO CASE CASE cBoxName = "Inbox" IF !USED('artiein') USE g:\email\artiein IN 0 ENDIF SELECT IIF(fromname = "Rodd Harris","c:\temp\image.bmp",""); as attachment, fromemail, subject, received, body, fulltext,; fromname FROM artiein; INTO CURSOR temp USE IN artiein this.grdList.RecordSource = "temp" this.grdList.RecordSourceType = 1 this.grdList.ColumnCount = 4 this.grdList.column1.ControlSource = "temp.attachment" this.grdList.column1.Sparse = .F. this.grdList.column1.DynamicCurrentControl = ; "iif(EMPTY(temp.attachment),'text1','imgntm1')" this.grdList.column2.header1.Caption = "From" this.grdList.column2.ControlSource = "temp.fromemail" this.grdList.column3.ControlSource = "temp.Subject" this.grdList.column4.ControlSource = "temp.received" CASE cBoxName = "Outbox" ... ENDCASE this.LockScreen = .F. this.grdList.Refresh()Any ideas why the DynamicCurrentControl seems to evaluate properly the first time around but not the next? (incidentally the cursor built is exactly the same in both cases)