Selasa, 15 April 2014

Re: [belajar-access] Access Formula problem

 

Ira Borneo...,

Untuk memberi pengakuan bahwa nilai negatif sama dengan positif, bisa memakai fungsi Abs(). Mengabsolutkan nilai. Yang negatif akan berubah menjadi positif.

Sehingga query-nya bisa diubah:

Net_CV_ar: Abs((100-[tblCustShip.tm_ar])/(100-[tblCustShip.im_adb])*([tblCustShip.CV_adb])-50,6*(100-[tblCustShip.tm_ar])/(100-[tblCustShip.IM_adb])*([tblCustShip.UL_H_adb])-5,83*[tblCustShip].[TM_ar]-0,167*(100-[tblCustShip.tm_ar])/(100-[tblCustShip.IM_adb])*([tblCustShip.UL_O_adb]))
Net_CV_ar_BTU/lbs: Abs(((100-[tblCustShip.tm_ar])/(100-[tblCustShip.im_adb])*([tblCustShip.CV_adb])-50,6*(100-[tblCustShip.tm_ar])/(100-[tblCustShip.IM_adb])*([tblCustShip.UL_H_adb])-5,83*[tblCustShip].[TM_ar]-0,167*(100-[tblCustShip.tm_ar])/(100-[tblCustShip.IM_adb])*([tblCustShip.UL_O_adb]))*1,8)
Net_CV_ar_BTU/lbs: Abs(((100-[tblCustShip.tm_ar])/(100-[tblCustShip.im_adb])*([tblCustShip.CV_adb])-50,6*(100-[tblCustShip.tm_ar])/(100-[tblCustShip.IM_adb])*([tblCustShip.UL_H_adb])-5,83*[tblCustShip].[TM_ar]-0,167*(100-[tblCustShip.tm_ar])/(100-[tblCustShip.IM_adb])*([tblCustShip.UL_O_adb]))*1,8)

Sedangkan hasil error, disebabkan oleh penyebut yang nilainya adalah 0. Untuk itu harus dihandle denga memanfaatkan fasilitas IIF:

Base Acit Ratio: Nz([tblCustShip.fe2o3];0)+Nz([tblCustShip.cao];0)+Nz([tblCustShip.mgo];0)+Nz([tblCustShip.na2o];0)+IIf([tblCustShip.sio2]=0;0;[tblCustShip.k2o]/[tblCustShip.sio2])+Nz([tblCustShip.al2o3];0)+Nz([tblCustShip.tio2];0)
Slagging Index: IIf(([tblCustShip.sio2]+[tblCustShip.al2o3]+[tblCustShip.tio2])*100/(100-[tblCustShip.im_adb])*([tblCustShip.ts_Adb])=0;0;([tblCustShip.fe2o3]+[tblCustShip.cao]+[tblCustShip.mgo]+[tblCustShip.na2o]+[tblCustShip.k2o])/([tblCustShip.sio2]+[tblCustShip.al2o3]+[tblCustShip.tio2])*100/(100-[tblCustShip.im_adb])*([tblCustShip.ts_Adb]))

Semoga bisa membantu dan memberi semangat.

Hariyanto (Surabaya)

--------------------------------------------
On Tue, 15/4/14, Ira Idotel <iraidotel@yahoo.com> wrote:

Subject: [belajar-access] Access Formula problem [2 Attachments]
To: belajar-access@yahoogroups.com
Date: Tuesday, 15 April, 2014, 1:02 PM


[Attachment(s) from Ira Idotel included
below]


Dear All ,

Pakar , suhu, sesepuh Access yth

saya punya problem mengenai formula pada Query , hasil
formula benar sesuai dengan yg di harapkan
namun bagaiman menghilangkan tanda #Error pada tampilan
Query apabila salah satu komponen atau komponen itu sendiri
kosong
dan juga bagaimana hasil tidak menampilkan minus seperti
pada gambar terlampir.

mohon pencerahannya
terimakasih , salam dan tetap sehat , semangat.maju terus
Access


salam, Ira Borneo


__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)
SPAM IS PROHIBITED
.

__,_._,___

Tidak ada komentar:

Posting Komentar