|
● 보고서
Private Sub FIND_AfterUpdate()
DoCmd.Minimize
On Error GoTo FIND_AfterUpdate_Err
With CodeContextObject
If (.FIND = 1) Then
DoCmd.OpenReport "자재전표", acPreview, "[발행일]", _
"[Forms]![보고서]![A]<=[발행일] And [발행일]<=[Forms]![보고서]![B]"
End If
If (.FIND = 2) Then
DoCmd.OpenReport "자재전표", acPreview, "", _
"[Forms]![보고서]![A]<=[발행일] And [발행일]<=[Forms]![보고서]![B] and [Forms]![보고서]![전표구분]=[전표구분]"
End If
If (.FIND = 3) Then
DoCmd.OpenReport "품목재고현황", acPreview ', "", _
"(((자재상위.발행일)>=[Forms]![보고서]![A] And (자재상위.발행일)<=[Forms]![보고서]![B])) "
End If
If (.FIND = 4) Then
DoCmd.OpenReport "현재재고현황", acPreview ', "", _
"[Forms]![보고서]![A]<=[발행일] And [발행일]<=[Forms]![보고서]![B] and [Forms]![보고서]![전표구분]=[전표구분] and [Forms]![보고서]![검색거래처]=[거래처코드]"
End If
생략,,,,
If (.FIND = 9) Then
DoCmd.OpenReport "현재재고현황세부", acPreview ', "", _
"[Forms]![보고서]![A]<=[발행일] And [발행일]<=[Forms]![보고서]![B] and [Forms]![보고서]![전표구분]=[전표구분] and [Forms]![보고서]![검색거래처]=[거래처코드]"
End If
End With
Me.FIND = ""
aa
FIND_AfterUpdate_Exit:
Exit Sub
FIND_AfterUpdate_Err:
MsgBox Error$
Resume FIND_AfterUpdate_Exit
End Sub |
입고-공정수량 : Sum(IIf([전표구분]=1,[수량],0))-Sum(IIf([전표구분]=2,[수량],0))
입고-공정금액 : Sum(IIf([전표구분]=2,[금액],0))-Sum(IIf([전표구분]=1,[금액],0))
등등 쿼리식 삽입
발행일 : 조건식
목차 |
이전 |
다음
|