brainzebra
Programmer
Every month there are different CommAcct files (and dif commaccts) that need to be imported into our system. I want to use the grid control to show the different CommAccts followed by a button to allow importing that CommAcct file.
Column1 is default texbox showing the CommAcct from a recordsource, and column2 is a command button named btnImport. Each rows button should be independantly enabled based on a field in the recordsource. How do I independantly set the btnImport enabled = .t. or enabled = .f. in different rows.
I need each rows button to possibly be enabled or disabled, and also probably need different code for each rows button based on CommAcct.
* this does not do it...
select commacct, imported ;
from CommAcctTable ;
into cursor cr
with thisform.grid1
.recordsource = "cr"
.column1.controlsource = "cr.commacct"
.column2.controlsource = "cr.imported"
sele cr
nRow = 1
.setfocus
scan
.activatecell(nRow, 2)
.column2.btnImport.enabled = cr.imported
nRow = nRow + 1
endscan
endwith
Column1 is default texbox showing the CommAcct from a recordsource, and column2 is a command button named btnImport. Each rows button should be independantly enabled based on a field in the recordsource. How do I independantly set the btnImport enabled = .t. or enabled = .f. in different rows.
I need each rows button to possibly be enabled or disabled, and also probably need different code for each rows button based on CommAcct.
* this does not do it...
select commacct, imported ;
from CommAcctTable ;
into cursor cr
with thisform.grid1
.recordsource = "cr"
.column1.controlsource = "cr.commacct"
.column2.controlsource = "cr.imported"
sele cr
nRow = 1
.setfocus
scan
.activatecell(nRow, 2)
.column2.btnImport.enabled = cr.imported
nRow = nRow + 1
endscan
endwith