----- Original Message -----From: Sudarsono SuhenkSent: Monday, June 13, 2011 3:34 PMSubject: RE: [belajar-access] Re-Reportdi event report REJECTION_DETAILS :
Private Sub Report_Activate()
Me.T46 = fn_reasonprofile(4.6, "")
Me.fl46 = fn_reasonprofile(4.6, "FLAT")
Me.fn46 = fn_reasonprofile(4.6, "FIN")
Me.sc46 = fn_reasonprofile(4.6, "SCAB")
Me.tk46 = fn_reasonprofile(4.6, "TK")
Me.sh46 = fn_reasonprofile(4.6, "SHAPE")
Me.pt46 = fn_reasonprofile(4.6, "PT")
Me.T49 = fn_reasonprofile(4.9, "")
Me.fl49 = fn_reasonprofile(4.9, "FLAT")
Me.fn49 = fn_reasonprofile(4.9, "FIN")
Me.sc49 = fn_reasonprofile(4.9, "SCAB")
Me.tk49 = fn_reasonprofile(4.9, "TK")
Me.sh49 = fn_reasonprofile(4.9, "SHAPE")
Me.pt49 = fn_reasonprofile(4.9, "PT")
Me.T88 = fn_reasonprofile(8.8, "")
Me.Fl88 = fn_reasonprofile(8.8, "FLAT")
Me.Fn88 = fn_reasonprofile(8.8, "FIN")
Me.Sc88 = fn_reasonprofile(8.8, "SCAB")
Me.tk88 = fn_reasonprofile(8.8, "TK")
Me.Sh88 = fn_reasonprofile(8.8, "SHAPE")
Me.pt88 = fn_reasonprofile(8.8, "PT")
End Sub
buat module ,misal module1 . lalu ketik koding dibawah ini :
Public Function fn_reasonprofile(ByVal parProfile As Single, ByVal parreason As String)
Dim vara As Variant
Dim m_month, m_year As Long
m_month = Month(Forms!F_MAIN_MENU!REPORT_DATE)
m_year = Year(Forms!F_MAIN_MENU!REPORT_DATE)
mstrkriteria1 = "PROFILE= " & parProfile & " AND MONTH(TANGGAL)=" & m_month & " AND YEAR(TANGGAL)=" & m_year
mstrkriteria2 = "PROFILE= " & parProfile & " AND REASON= '" & parreason & "' AND MONTH(TANGGAL)=" & m_month & " AND YEAR(TANGGAL)=" & m_year
If parreason = "" Then
'vara = DLookup("NO_OF_COILS", "T_REJECTION_DETAILS", "PROFILE= " & parProfile & " AND MONTH(TANGGAL)=" & Month(Forms!F_MAIN_MENU!REPORT_DATE) & " AND YEAR(TANGGAL)=" & Year(Forms!F_MAIN_MENU!REPORT_DATE))
vara = DSum("NO_OF_COILS", "T_REJECTION_DETAILS", mstrkriteria1)
Else
'vara = DLookup("NO_OF_COILS", "T_REJECTION_DETAILS", "PROFILE= " & parProfie & " AND REASON='" & parreason & "' AND MONTH(TANGGAL)=" & Month(Forms!F_MAIN_MENU!REPORT_DATE) & " AND YEAR(TANGGAL)=" & Year(Forms!F_MAIN_MENU!REPORT_DATE))
vara = DSum("NO_OF_COILS", "T_REJECTION_DETAILS", mstrkriteria2)
End If
vara = Nz(vara, 0)
fn_reasonprofile = vara
End Function
Semoga dapat dimengerti ....
To: belajar-access@yahoogroups.com
From: maulana_pup@yahoo.co.id
Date: Mon, 13 Jun 2011 10:37:39 +0700
Subject: [belajar-access] Re-Report [1 Attachment]
[Attachment(s) from Maulana included below]Dear Mas SudarsonoMaaf nih saya belum mengerti maksudnyasaya krim file nya sajasalam
__._,_.___
Wednesday, June 15, 2011
Re: [belajar-access] Re-Report
Dear Mas Sudarsono
Trims atas bantuannya, sudah berhasil
SPAM IS PROHIBITED
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment