麻辣家族討論版版's Archiver

keovin790916 發表於 2016-11-3 08:47

access 函數篩選問題 iif

請問一下  =IIf([類別]="F**",Round([total]*0.04,0),Round([total]*0.0225,0),([類別="S**",Round([total]*0.04,0),Round([total]*0.0225,0),([類別]="L**",Round([total]*0.04,0),Round([total]*0.0225,0))))

請問
如果我要 塞選符合  s f l    就乘上我要的   要如何寫?

ky2599y 發表於 2016-11-4 22:54

Iif(left$(類別),1)='f',then,false)
以上為示意

ky2599y 發表於 2016-11-4 22:59

我覺得round寫在乘完後就不用寫那麼多遍了。

keovin790916 發表於 2016-11-5 09:42

大大 我看不太懂@@你的
Iif(left$(類別),1)='f',then,false)
以上為示意

ky2599y 發表於 2016-11-5 13:10

-.-
Round(IIf(Left$([類別],1)="F",[total]*0.04,IIf(Left$([類別],1)="S",[total]*0.04,IIf(Left$([類別],1)="L",[total]*0.04,[total]*0.0225))),0)

keovin790916 發表於 2016-11-7 08:33

[b]回復 [url=http://forum.twbts.com/redirect.php?goto=findpost&pid=95292&ptid=18672]5#[/url] [i]ky2599y[/i] [/b]


    原來round 還能擺在前面  ,iif在配合left 使用    感謝大大指點    又多學到了一種

頁: [1]

麻辣家族討論版版為 麻辣學園 網站成員  由 昱得資訊工作室 © Since 1993 所提供