Hi,
In a column of a grid, the field is defined as c(1),
I want to display the word 'Posted' in that column
if the field content is 'P', if not then blank.
I have tried the iif() in the control thisform.grid1.column1.text1.value
It just display the word 'P', I though it is because the field length is c(1)
please advise
How can I do that whitout change the field length ?
I would retrieve those records by 'SELECT ..... ' into a temp table
Can I change the field length in doing 'SELECT' ?

thanks

Re: grid display problem by Stefan

Stefan
Fri Sep 17 02:55:47 CDT 2004

Yes, you can do both - either have a grid.ColumnX.ControlSource
expression like "IIF( yourTable.theField='P', 'Posted', '')"
or do it in the SQL statement
SELECT *, ;
IIF( theField=='P', 'Posted', SPACE(6) ) AS yourExpr ;
FROM yourTable ....


hth
-Stefan

"Eddy" <Eddy@discussions.microsoft.com> schrieb im Newsbeitrag
news:2EB81F81-C255-4193-8278-2C0A9EC51BAC@microsoft.com...
> Hi,
> In a column of a grid, the field is defined as c(1),
> I want to display the word 'Posted' in that column
> if the field content is 'P', if not then blank.
> I have tried the iif() in the control thisform.grid1.column1.text1.value
> It just display the word 'P', I though it is because the field length is c(1)
> please advise
> How can I do that whitout change the field length ?
> I would retrieve those records by 'SELECT ..... ' into a temp table
> Can I change the field length in doing 'SELECT' ?
>
> thanks


Re: grid display problem by Alan

Alan
Fri Sep 17 09:19:32 CDT 2004

Try setting the bound property of the column to .f.

Alan
Just a programmer
Park West Gallery
"Eddy" <Eddy@discussions.microsoft.com> wrote in message
news:2EB81F81-C255-4193-8278-2C0A9EC51BAC@microsoft.com...
> Hi,
> In a column of a grid, the field is defined as c(1),
> I want to display the word 'Posted' in that column
> if the field content is 'P', if not then blank.
> I have tried the iif() in the control thisform.grid1.column1.text1.value
> It just display the word 'P', I though it is because the field length is
c(1)
> please advise
> How can I do that whitout change the field length ?
> I would retrieve those records by 'SELECT ..... ' into a temp table
> Can I change the field length in doing 'SELECT' ?
>
> thanks