display either running total or msg into textbox by conditional

S

skk

I have 2 text box (txtA, txtB) which does the running total and works good
but if txtA > 0 then I want txtB to show "N/A" or blank in that fields.

txtA control source =Sum([txtQty])
txtB control source =Sum(([txtTotQty]-[txtTotProd])/[txtTotQty])

first question, is there a way where you can build the conditional statement
in txtB control source like if txtA > 0 then
Sum(([txtTotQty]-[txtTotProd])/[txtTotQty]) (if this is possible what is the
correct syntax) if not, any other solution?? Thanks.
 
K

Klatuu

skk said:
I have 2 text box (txtA, txtB) which does the running total and works good
but if txtA > 0 then I want txtB to show "N/A" or blank in that fields.

txtA control source =Sum([txtQty])
txtB control source =IifI(txtA > 0, Sum(([txtTotQty]-[txtTotProd])/[txtTotQty], "N/A"))

first question, is there a way where you can build the conditional statement
in txtB control source like if txtA > 0 then
Sum(([txtTotQty]-[txtTotProd])/[txtTotQty]) (if this is possible what is the
correct syntax) if not, any other solution?? Thanks.
 
S

skk

Hi! Klatuu, am I missing something or something got cutoff? I'm not seeing
anything.

Klatuu said:
skk said:
I have 2 text box (txtA, txtB) which does the running total and works good
but if txtA > 0 then I want txtB to show "N/A" or blank in that fields.

txtA control source =Sum([txtQty])
txtB control source =IifI(txtA > 0, Sum(([txtTotQty]-[txtTotProd])/[txtTotQty], "N/A"))

first question, is there a way where you can build the conditional statement
in txtB control source like if txtA > 0 then
Sum(([txtTotQty]-[txtTotProd])/[txtTotQty]) (if this is possible what is the
correct syntax) if not, any other solution?? Thanks.
 
Top