|
¡Ü ¸¶¹ý»ç¸¦ ÀÌ¿ë
Private Sub del_Click()
On Error GoTo Err_del_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_del_Click:
Exit Sub
Err_del_Click:
MsgBox Err.Description
Resume Exit_del_Click
End Sub |
¡¡
°øÁ¤ ¹× ¿Ï¼ºÇ° ÀÚÀç ÇÁ·Î¼¼½º¿¡¼´Â °Å·¡Ã³ÄÚµå ÀÔ·ÂÀ» ºÒ°¡Çϵµ·Ï Á¦¾î
µÎ °¡Áö ¹æ¹ý
visible, enabled, LOCKED µµ¿ò¸»ÂüÁ¶
¡Ü ½Å±ÔÇ°¸ñµî·Ï
1. ±¸ºÐ1À» ´õºíŬ¸¯ÇÏ¿© ¼±ÅÃ
2. ±¸ºÐ2À» ´õºíŬ¸¯ÇÏ¿© ¼±ÅÃ
3. ±¸ºÐ3À» ´õºíŬ¸¯ÇÏ¿© ¼±ÅÃ
4. Ç°¸ñÄڵ忡 ½Å±Ô Ç°¸ñÄڵ尡 µî·ÏµË´Ï´Ù.
5. ½Å±ÔÇ°¸ñÄڵ带 ´õºíŬ¸¯ÇÏ¸é µî·ÏµÈ Àüüǰ¸ñÄڵ尡 Ç¥½Ã
6. °Ë»ö¶õ¿¡ ¾Ë°í ÀÖ´Â ºÎ¹® Ç°¸ñ¸íÀÇ ³»¿ëÀ» ÀÔ·ÂÇÏ¸é ºñ½ÁÇÑ Ç°¸ñÄڵ尡 °Ë»ö
7. ¸®½ºÆ®Ç׸ñÀ» Ŭ¸¯
8. °Ë»öÀ» Ŭ¸¯Çϸé ã±â°í ÇÏ´Â Ç°¸ñÁ¤º¸ Ç¥½Ã
¡Ü ÄÚµåÀÛ¼º
Function aa()
Me.Ç°¸ñÄÚµå = Ç°¸ñ±¸ºÐ1 & "-" & Ç°¸ñ±¸ºÐ2 & "-" & Ç°¸ñ±¸ºÐ3
Me.Ç°¸ñ»óÀ§¸í = Ç°¸ñ¸í1 & "-" & Ç°¸ñ¸í2 & "-" & Ç°¸ñ¸í3
End Function
Private Sub Ç°¸ñ±¸ºÐ1_DblClick(Cancel As Integer)
On Error GoTo Err_Ç°¸ñ±¸ºÐ1_DblClick
Me.Ç°¸ñ±¸ºÐ2.SetFocus
Dim FIND As String
FIND = "*" & [Forms]![Ç°¸ñÄÚµå»óÀ§]![Ç°¸ñ±¸ºÐ1] & "*"
DoCmd.OpenForm "FIND", acNormal
If IsNull(Me.Ç°¸ñ±¸ºÐ1) Or Me.Ç°¸ñ±¸ºÐ1 = "" Then
Forms!FIND!LIST.RowSource = " SELECT * FROM Ç°¸ñ±¸ºÐ1 "
Else
Forms!FIND!LIST.RowSource = " SELECT * " _
& " FROM Ç°¸ñ±¸ºÐ1 " _
& " WHERE (((Ç°¸ñ±¸ºÐ1) Like " & "'" & FIND & "'));"
End If
Forms!FIND!N = 52
Forms!FIND.LIST.Requery
Forms!FIND!¼º¸í1.SetFocus
Exit_Ç°¸ñ±¸ºÐ1_DblClick:
Exit Sub
Err_Ç°¸ñ±¸ºÐ1_DblClick:
MsgBox Err.Description
Resume Exit_Ç°¸ñ±¸ºÐ1_DblClick
End Sub
Private Sub Ç°¸ñÄÚµå_DblClick(Cancel As Integer)
On Error GoTo Err_Ç°¸ñÄÚµå_DblClick
Me.Ç°¸ñ±¸ºÐ1.SetFocus
Dim FIND As String
FIND = "*" & [Forms]![Ç°¸ñÄÚµå»óÀ§]![Ç°¸ñÄÚµå] & "*"
% Æû¸ñÄÚµå¿Í ºñ½ÁÇÑ °´Ã¼ ÁöÁ¤
DoCmd.OpenForm "FIND", acNormal
If IsNull(Me.Ç°¸ñÄÚµå) Or Me.Ç°¸ñÄÚµå = "" Then
Forms!FIND!LIST.RowSource = " SELECT Ç°¸ñÄÚµå, Ç°¸ñ»óÀ§¸í, ´Ü°¡1, ´Ü°¡2, ´Ü°¡3, ´Ü°¡4 FROM Ç°¸ñÄÚµå»óÀ§ "
Else
Forms!FIND!LIST.RowSource = " SELECT Ç°¸ñÄÚµå, Ç°¸ñ»óÀ§¸í, ´Ü°¡1, ´Ü°¡2, ´Ü°¡3, ´Ü°¡4 " _
& " FROM Ç°¸ñÄÚµå»óÀ§ " _
& " WHERE (((Ç°¸ñÄÚµå) Like " & "'" & FIND & "'));"
End If
Forms!FIND!N = 51
Forms!FIND.LIST.Requery
Forms!FIND!¼º¸í1.SetFocus
Exit_Ç°¸ñÄÚµå_DblClick:
Exit Sub
Err_Ç°¸ñÄÚµå_DblClick:
MsgBox Err.Description
Resume Exit_Ç°¸ñÄÚµå_DblClick
End Sub
|
¡¡
½Å±Ô°Å·¡Ã³Äڵ带 ´õºíŬ¸¯ÇÏ¸é °Ë»öÁ¶°Ç¿¡
ÀϺÎȸ»ç¸íÀ» ÀÔ·ÂÇÏ°í ¿£Å͸¦ Ä¡¸é ¸®½ºÆ®¿¡ ȸ»ç°¡ ³ªÅ¸³ª¸ç, ¸®½ºÆ®¸¦ Ŭ¸¯ÇÏ¸é °Ë»ö°Å·¡Ã³¿¡ ÀÔ·ÂµÇ°í °Ë»öÀ» ´©¸£¸é °ü·Ã ȸ»çÀÇ Á¤º¸°¡ ȸéÀ¸·Î
Ãâ·ÂµË´Ï´Ù.
°Å·¡Ã³ÀÇ ÁÖ¼Ò´Â ¿ìÆí¹øÈ£·Î °Ë»öÇÏ´Â ¹æ½ÄÀ» »ç¿ëÇÑ´Ù¸é Á¤È®ÇÑ ÁÖ¼Ò °í°´°ü¸®°¡ µÉ ¼ö
ÀÖ½À´Ï´Ù. [°í°´°ü¸®]
Private Sub °Å·¡Ã³ÄÚµå_DblClick(Cancel As Integer)
On Error GoTo Err_°Å·¡Ã³ÄÚµå_DblClick
Me.°Å·¡½ÃÀÛÀÏ.SetFocus
Dim FIND As String
FIND = "*" & [Forms]![°Å·¡Ã³]![°Å·¡Ã³ÄÚµå] & "*"
DoCmd.OpenForm "FIND", acNormal
If IsNull(Me.°Å·¡Ã³ÄÚµå) Or Me.°Å·¡Ã³ÄÚµå = "" Then
Forms!FIND!LIST.RowSource = " SELECT °Å·¡Ã³ÄÚµå, ȸ»çÀ̸§, ´ëÇ¥ÀÚÀ̸§, ÀüȹøÈ£1 FROM °Å·¡Ã³ "
Else
Forms!FIND!LIST.RowSource = " SELECT °Å·¡Ã³ÄÚµå, ȸ»çÀ̸§, ´ëÇ¥ÀÚÀ̸§, ÀüȹøÈ£1 " _
& " FROM °Å·¡Ã³ " _
& " WHERE (((°Å·¡Ã³ÄÚµå) Like " & "'" & FIND & "'));"
End If
Forms!FIND!N = 61
Forms!FIND.LIST.Requery
Forms!FIND!¼º¸í1.SetFocus
Exit_°Å·¡Ã³ÄÚµå_DblClick:
Exit Sub
Err_°Å·¡Ã³ÄÚµå_DblClick:
MsgBox Err.Description
Resume Exit_°Å·¡Ã³ÄÚµå_DblClick
End Sub
Private Sub °Ë»ö_Click()
DoCmd.ApplyFilter "", "[°Å·¡Ã³ÄÚµå]=forms!°Å·¡Ã³![°Ë»ö°Å·¡Ã³]"
'DoCmd.OpenForm "°Å·¡Ã³", acNormal, , "[°Å·¡Ã³ÄÚµå]=forms!°Å·¡Ã³![°Ë»ö°Å·¡Ã³]"
End Sub
Private Sub Àüüº¸À̱â_Click()
DoCmd.ShowAllRecords
End Sub
Private Sub ÃʱâȸéÀ̵¿_Click()
DoCmd.OpenForm "Ãʱâȸé", acNormal
End Sub |
°¢ °Ë»ö¾î´Â ¼º¸í1Çʵå
Private Sub ¼º¸í1_AfterUpdate()
Dim FIND As String
Dim FIND1 As String
Dim FIND2 As String
Dim FIND3 As String
Dim FIND4 As String
Dim FIND5 As String
Dim FIND6 As String
Dim FIND7 As String
FIND = "*" & [Forms]![FIND]![¼º¸í1] & "*"
If Me.N = 11 Then
Forms!FIND!LIST.RowSource = "SELECT ÀüÇ¥¹øÈ£, ¹ßÇàÀÏ, ÀüÇ¥±¸ºÐ FROM ÀÚÀç»óÀ§ WHERE (((ÀÚÀç»óÀ§.ÀüÇ¥±¸ºÐ)=[Forms]![ÀÚÀç»óÀ§]![ÀüÇ¥±¸ºÐ1]) AND ((ÀÚÀç»óÀ§.¹ßÇàÀÏ) Like " & "'" & FIND & "'));"
»ý·«,,,,,,
ElseIf Me.N = 24 Then
Me.LIST.RowSource = " SELECT ÀÚÀçÇÏÀ§.Ç°¸ñÄÚµå, Ç°¸ñÄÚµå»óÀ§.Ç°¸ñ»óÀ§¸í,
Sum(IIf([ÀüÇ¥±¸ºÐ]=1,[¼ö·®],0))-Sum(IIf([ÀüÇ¥±¸ºÐ]=2,[¼ö·®],0)) AS [ÀÔ°í-°øÁ¤Àç°í¼ö·®]" _
& " FROM Ç°¸ñÄÚµå»óÀ§ INNER JOIN (ÀÚÀç»óÀ§ INNER JOIN ÀÚÀçÇÏÀ§ ON ÀÚÀç»óÀ§.ÀüÇ¥¹øÈ£ = ÀÚÀçÇÏÀ§.ÀüÇ¥¹øÈ£) ON Ç°¸ñÄÚµå»óÀ§.Ç°¸ñÄÚµå = ÀÚÀçÇÏÀ§.Ç°¸ñÄÚµå" _
& " WHERE (((ÀÚÀç»óÀ§.¹ßÇàÀÏ)<=[Forms]![ÀÚÀç»óÀ§]![¹ßÇàÀÏ]) AND ((Ç°¸ñÄÚµå»óÀ§.Ç°¸ñ»óÀ§¸í) Like " & "'" & FIND & "'))" _
& " GROUP BY ÀÚÀçÇÏÀ§.Ç°¸ñÄÚµå, Ç°¸ñÄÚµå»óÀ§.Ç°¸ñ»óÀ§¸í " _
& " HAVING (((Sum(IIf([ÀüÇ¥±¸ºÐ]=1,[¼ö·®],0))-Sum(IIf([ÀüÇ¥±¸ºÐ]=2,[¼ö·®],0)))>0)); "
»ý·«,,,,,,
If Me.N = 51 Then '2
FIND2 = "*" & [Forms]![Ç°¸ñÄÚµå»óÀ§]![Ç°¸ñÄÚµå] & "*"
Me.LIST.RowSource = " SELECT Ç°¸ñÄÚµå, Ç°¸ñ»óÀ§¸í, ´Ü°¡1, ´Ü°¡2, ´Ü°¡3, ´Ü°¡4 " _
& " FROM Ç°¸ñÄÚµå»óÀ§ " _
& " WHERE (((Ç°¸ñ»óÀ§¸í) Like " & "'" & FIND & "') and ((Ç°¸ñÄÚµå) Like " & "'" & FIND2 & "'));"
%%%Á¶°Ç½ÄÀº Ç°¸ñ»óÀ§¸é »Ó¸¸ ¾Æ´Ï¶ó Ç°¸ñÄÚµå¿Í ¿¬°áµÇ¾î
ÀÖ½À´Ï´Ù.
ElseIf Me.N = 52 Then
FIND3 = "*" & [Forms]![Ç°¸ñÄÚµå»óÀ§]![Ç°¸ñ±¸ºÐ1] & "*"
Me.LIST.RowSource = "SELECT * FROM Ç°¸ñ±¸ºÐ1 " _
& " WHERE (((Ç°¸ñ¸í1) Like " & "'" & FIND & "') and ((Ç°¸ñ±¸ºÐ1) Like " & "'" & FIND3 & "'));"
»ý·«,,,,,
Me.LIST.Requery
Me.¼º¸í1.SetFocus
End Sub
Private Sub LIST_CLICK()
If Me.N = 11 Then '±³À°±¸ºÐ
Forms!ÀÚÀç»óÀ§!°Ë»öÀüÇ¥¹øÈ£ = Me.LIST.Column(0)
ElseIf Me.N = 12 Or Me.N = 42 Then
Forms!ÀÚÀç»óÀ§!°Å·¡Ã³ÄÚµå = Me.LIST.Column(0)
ElseIf Me.N = 13 Or Me.N = 23 Or Me.N = 33 Or Me.N = 43 Then
Forms!ÀÚÀç»óÀ§!ÀÚÀçÇÏÀ§.Form!Ç°¸ñÄÚµå = Me.LIST.Column(0)
If [Forms]![ÀÚÀç»óÀ§]![ÀüÇ¥±¸ºÐ] = 1 Then
Forms!ÀÚÀç»óÀ§!ÀÚÀçÇÏÀ§.Form!´Ü°¡ = Me.LIST.Column(2)
»ý·«,,,,,
End If
Forms!ÀÚÀç»óÀ§!ÀÚÀçÇÏÀ§.Form!±Ý¾× = Forms!ÀÚÀç»óÀ§!ÀÚÀçÇÏÀ§.Form!´Ü°¡ * Forms!ÀÚÀç»óÀ§!ÀÚÀçÇÏÀ§.Form!¼ö·®
ElseIf Me.N = 24 Or Me.N = 34 Or Me.N = 44 Then
Forms!ÀÚÀç»óÀ§!ÀÚÀçÇÏÀ§.Form!Ç°¸ñÄÚµå = Me.LIST.Column(0)
ss
End Sub
|
¸ñÂ÷ |
ÀÌÀü
| ´ÙÀ½
|