±³À°°úÁ¤ ³ªÀÇÇнÀ ¿ÀÇǽºÆÁ °Ë»ö ¹«·á°­ÁÂ
Home ·Î±×ÀΠȸ¿ø°¡ÀÔ °í°´¼¾ÅÍ »çÀÌÆ®¸Ê
¿ÀÇǽºÆ©ÅÍ ±â¾÷ASP¼­ºñ½º > ¹«·á°­ÁÂ
¾×¼¼½º 2000 µû¶óÇϱâ
Ȩ·¯´× ¾×¼¼½º 2000
¾×¼¼½º 2000 ÀÏÀÏ°­ÁÂ
¾×¼¼½º 2002 »õ·Î¿î±â´É
±è±Ô°æ´ÔÀÇ DB ±âÃÊ
¾×¼¼½º ÇÁ·ÎÁ§Æ® °­ÁÂ
Home > ¹«·á°­Á > ¾×¼¼½º
¾×¼¼½º ¿¬Àç °­Á - ÀÚÀç°ü¸® ÇÁ·ÎÁ§Æ® , Access

¡Ü ¾÷¹« ÇÁ·Î¼¼½º

01-04.gif(51624¹ÙÀÌÆ®)

ÀÚÀç»ó°ú ÀÚÀçÇÏ °£ÀÇ ¿¬°áÀÌ µÇ¾î ÀÖ½À´Ï´Ù.

ÀÚÀç»óÀÇ °Å·¡Ã³Äڵ尡 ÀÔ°í ¹× ÆǸŰúÁ¤¿¡¼­ º¸ÀÌ´Â ÀÌÀ¯´Â °Å·¡Ã³¿¡ ´ëÇÑ ÆǸŰü¸®ÇöȲÀ» °ü¸®Çϱâ À§ÇÔÀÌ°í °øÁ¤ ¹× ¿ÏÁ¦Ç°Àº ȸ»ç³»ºÎ¿¡¼­ °áÁ¤µÇ´Â ÀÏÀ̹ǷΠ°Å·¡Ã³ ¼±ÅÃÀ» ÇÏÁö ¸øÇÏ°Ô ÃʱâÈ­¸é¿¡¼­ºÎÅÍ Á¦¾îÇÏ¿© °øÁ¤ ¹× ¿ÏÁ¦Ç°ÀÎ °æ¿ì °Å·¡Ã³°¡ º¸ÀÌÁö ¾Êµµ·Ï ÇÑ °ÍÀÔ´Ï´Ù.

Áï ÀÔ°íÀÚÀç´Â ÀÔ°íó¿¡ ´ëÇÑ ÀÔ°íÇ°¸ñÇöȲÀ» °ü¸®Çϱâ À§ÇÔÀÌ°í, ÆǸÅÀÚÀç´Â ÆǸŰŷ¡Ã³¿¡ ´ëÇÑ ¸ÅÃâÇöȲÀ» º¸±âÀ§ÇØ °Å·¡Ã³¸¦ »óÀ§ÆûÀ¸·Î ¿¬°áÇÏ¿© °Å·¡Ã³º° °ü¸®°¡ µÉ ¼ö ÀÖµµ·Ï ¸¸µé¾ú½À´Ï´Ù. ¸ÕÀú ÀÔ°í°ü¸®¸¦ ¼³¸íÇϱâ Àü¿¡ °Ë»ö Å°¿¡ ´ëÇÑ º°µµ ÆûÀ» ÁÖ¾î ÇÁ·Î±×·¥³»¿¡¼­ ÇϳªÀÇ ÇÊµå ³»¿¡¼­ Àüü¸¦ °ü¸®µÉ ¼ö ÀÖµµ·Ï SQL¹®À» ÀÌ¿ëÇÏ¿© ¸¸µé¾ú½À´Ï´Ù.

1. ¹ßÇàÀÏÀ» ÀÔ·ÂÇÑ´Ù.
2. ¹ßÇàÀÚ¸¦ ÀÔ·ÂÇÑ´Ù.
3. ºÎ¼­Äڵ带 ÀÔ·ÂÇÑ´Ù.
4. °Å·¡Ã³Äڵ带 ÀÔ·ÂÇÑ´Ù.

¸¸¾à °Å·¡Ã³Äڵ带 ¸ð¸¦ °æ¿ì, ´õºíŬ¸¯ÇÏ°í ¾Ë°í ÀÖ´Â ºñ½ÁÇÑ È¸»ç¸íÀ» ÀÔ·ÂÇÏ¸é °ü·Ã ȸ»ç¸íÀÌ ³ªÅ¸³ª¸ç ¸®½ºÆ® Ç׸ñ Áß ÇÑ È¸»ç¸¦ Ŭ¸¯Çϸé ÀÚÀç»óÀ§Æû¿¡ °Å·¡Ã³Äڵ尡 µî·ÏµË´Ï´Ù.

±¸ºÐ : ¹ßÇàÀÏ
¼³¸í : ÀüÇ¥¹øÈ£¿Í ¿¬°áµÇ¾î ÀÖÀ¸¸ç, ´õºíŬ¸¯½Ã ³»¸²Â÷¼øÀ¸·Î ¹ßÇàÀüÇ¥°¡ Ç¥½ÃµÇ¸ç, 
             °Ë»ö¶õ¿¡ ³¯Â¥¸¦ ÀÔ·ÂÇϸé ÀüÇ¥°Ë»öÀÌ °¡´ÉÅä·Ï ÇÏ¿´½À´Ï´Ù.

¡Ü º¯¼ö¸¦ ÁöÁ¤ÇÏ¿© ¼³¸íÇÏ¿©¾ß Çϳª º¯¼ö°´Ã¼ÁöÁ¤ ¾øÀÌ Ç®¾î¼­ ¼³¸íÇϵµ·Ï ÇÏ°Ú½À´Ï´Ù.

Private Sub ¹ßÇàÀÏ_AfterUpdate()
Me.ÀüÇ¥±¸ºÐ = Me.ÀüÇ¥±¸ºÐ1
ÀüÇ¥±¸ºÐÀº ÃʱâÈ­¸é¿¡ ¼³Á¤µÈ Äڵ尪À» °®°í ¿É´Ï´Ù.
1->ÀÔ°í

2->°øÁ¤
3->¿ÏÁ¦Ç°
4->ÆǸÅ


Me.¼öÁ¤ÀÏ = Now()
ÀÔ·ÂÆû¿¡´Â ³ªÅ¸³ªÁö ¾Ê½À´Ï´Ù. È­¸éº¸È£¸¦ ½ÇÇà½ÃÄÑ Â÷±â Àü»ê´ã´çÀÚ°¡ ÃÖ±Ù¿¡ º¯µ¿µÈ ÀüÇ¥¸¦ ã¾Æ °ü¸®ÇÒ ¼ö ÀÖµµ·Ï ¸¸µç °ÍÀÔ´Ï´Ù.

If IsNull(Me.ÀüÇ¥¹øÈ£) Or Me.ÀüÇ¥¹øÈ£ = "" Then
Me.ÀüÇ¥¹øÈ£ = Me.ÀüÇ¥±¸ºÐ & "-" & Format(Me.¹ßÇàÀÏ, "yyyymmdd") & "-" & 1001 + Right(Me.ÀϷùøÈ£, 3)
ÀüÇ¥¹øÈ£(FK) : 1- 20000101-0012 ; ÀüÇ¥±¸ºÐ - ³¯Â¥-ÀϷùøÈ£(4ÀÚ¸®·Îº¯°æ)
Áï ÀüÇ¥¹øÈ£°¡ ºñ¾î ÀÖ´Ù¸é À§¿Í °°Àº °á°ú 
ELSE ºÎ¹®¿¡ ÀÌ¿Ü¿¡ ´ëÇÑ °á°ú°ªÀÌ µÇµµ·Ï MSGBOX¸¦ ¼³Á¤Çϸé Á»´õ ¿Ïº®ÇÑ ÇÁ·Î±×·¥ÀÌ µÉ ¼ö ÀÖ½À´Ï´Ù.

End If
End Sub

¡Ü ´ÙÀ½Àº ÀüÇ¥°Ë»öÀÇ ´Ü°è

Private Sub ¹ßÇàÀÏ_DblClick(Cancel As Integer)
DoCmd.OpenForm "FIND", acNormal
-> FIND ÆûÀ» ¿­±â
Forms!FIND!N = 11
FIND ÆûÀÇ Çʵå N¿¡ 11¸¦ Ç¥±âÇϽÿÀ
ÀÌ°ÍÀº ÇϳªÀÇ °Ë»öÆûÀ» ¿©·¯ Ç׸ñ°Ë»öÀÌ °¡´ÉÅä·ÏÇϱâ À§ÇÑ ±¸ºÐÀÚ¶ó°í ÇÒ ¼ö ÀÖ´Ù.

Forms!FIND!LIST.RowSource = " SELECT ÀüÇ¥¹øÈ£, ¹ßÇàÀÏ, ÀüÇ¥±¸ºÐ FROM ÀÚÀç»óÀ§ WHERE (((ÀÚÀç»óÀ§.ÀüÇ¥±¸ºÐ) = [Forms]![ÃʱâÈ­¸é]![ÀüÇ¥±¸ºÐ1])) ORDER BY ÀÚÀç»óÀ§.¹ßÇàÀÏ DESC;"
À§ÀÇ ³»¿ªÀº °Ë»öÆûÀ» ¿­¸é¼­ ÀÔ°í °úÁ¤°ú °°Àº Á¶°ÇÀ¸·Î, ÀüÇ¥¹øÈ£°¡ ³»¸²Â÷¼øÀ¸·Î Á¤¸®µÇ¾î Ç¥±âÇϽÿÀ
Forms!FIND!¼º¸í1.SetFocus
¼º¸í1·Î À̵¿ÇϽʽÿÀ. ¾Æ´Ï¸é DOCMD¹®À» ÀÌ¿ëÇÏ¿© CONTROL¹®À» »ç¿ëÇصµ µË´Ï´Ù.
End Sub

Private Sub °Ë»ö_Click()
DoCmd.ApplyFilter "", "[ÀüÇ¥¹øÈ£]= [Forms]![ÀÚÀç»óÀ§]![°Ë»öÀüÇ¥¹øÈ£]"
Áï, ÇÊÅÍÀÇ Á¶°Ç½ÄÀ̶ó°í ÇÒ ¼ö ÀÖ½À´Ï´Ù. ACFORMS°£ÀÇ Â÷ÀÌ´Â Çѹø ÀÛ¼ºÇÑ ÈÄ ¼Óµµ¸¦ ÃøÁ¤Çغ¸¸é ÀÌÇØÇϱ⠽¬¿ï °ÍÀÔ´Ï´Ù.
ÇÊÅ͸¦ ¸¹ÀÌ ÀÌ¿ëÇÏ´Â °÷Àº °í°´°ü¸®¿¡¼­ ¸¹ÀÌ ÀÌ¿ëµÇ°í ÀÖ´Ù. Áï ¤¡,¤¤,¤§ µîµî¿¡¼­ VBA·Î ÀÛ¼ºµÈ´Ù.


End Sub

01-05.gif(12275¹ÙÀÌÆ®)

Private Sub °Å·¡Ã³ÄÚµå_DblClick(Cancel As Integer)
DoCmd.OpenForm "FIND", acNormal
Forms!FIND!N = 12
¿©±â¼­´Â 12·Î ÁöÁ¤
Forms!FIND!LIST.RowSource = "SELECT °Å·¡Ã³ÄÚµå,ȸ»çÀ̸§,´ëÇ¥ÀÚÀ̸§,ÀüÈ­¹øÈ£1 FROM °Å·¡Ã³"
°Å·¡Ã³¿¡ ´ëÇÑ °Å·¡Ã³ÄÚµå, ȸ»çÀ̸§ µîµîÇ¥½Ã
Forms!FIND!¼º¸í1.SetFocus
End Sub

Private Sub ÃʱâÈ­¸é_Click()
DoCmd.OpenForm "ÃʱâÈ­¸é", acNormal
End Sub

Private Sub Command58_Click()
ÀüºÎ º¸À̱âÀÇ Ç¥±â
DoCmd.ApplyFilter "", "[ÀüÇ¥±¸ºÐ] = [Forms]![ÀÚÀç»óÀ§]![ÀüÇ¥±¸ºÐ1]"
DoCmd.GoToRecord , , acLast
ÂüÁ¶ DoCmd.ShowAllRecords-> ÇÊÅÍÇØÁö ÇÏ°í ÀüÁ¦·¹Äڵ带 Ç¥½ÃÇÕ´Ï´Ù.
End Sub

Private Sub Form_Open(Cancel As Integer)
DoCmd.Maximize
Me.ÀüÇ¥À̸§ = [Forms]![ÃʱâÈ­¸é]![ÀüÇ¥±¸ºÐ1] & " ÀÚÀçÀüÇ¥"
ÀüÇ¥À̸§Àº ÀüÇ¥±¸ºÐ1 ÀÚÀçÀüÇ¥·Î Ç¥½ÃµÇ¾î ÀÔ°í ÀÚÀçÀüÇ¥,°øÁ¤ ÀÚÀçÀüÇ¥ µî°ú °°ÀÌ Ç¥½ÃµÊ
End Sub

¡Ü ÀÚÀçÇÏÀ§ÀÇ ³»¿ë
Private Sub ´Ü°¡_AfterUpdate()
Me.±Ý¾× = Me.´Ü°¡ * Me.¼ö·®
»ý·«
End Sub

¡¡
Private Sub ºñ°í_DblClick(Cancel As Integer)

03-03.gif(10979¹ÙÀÌÆ®)

ÀüÇ¥±¸ºÐÀÌ 1ÀÎ °æ¿ì ¸Þ½ÃÁö â
If Forms!ÀÚÀç»óÀ§!ÀüÇ¥±¸ºÐ = 1 Then
MsgBox " ÀÔ°í¿¡¼± Àç°í¸¦ ÆľÇÇÒ¼ö ¾øµµ·Ï Çß½À´Ï´Ù. ´Ü ÀÌÀ¯´Â !!!", vbInformation, "º¯Á¤ÇÑ"
Else
DoCmd.OpenForm "FIND", acNormal

03-04.gif(10581¹ÙÀÌÆ®)

If Forms!ÀÚÀç»óÀ§!ÀüÇ¥±¸ºÐ = 2 Then
°øÁ¤´Ü°è
Forms!FIND!N = 24
Forms!FIND!LIST.RowSource = " SELECT ÀÚÀçÇÏÀ§.Ç°¸ñÄÚµå, Ç°¸ñÄÚµå»óÀ§.Ç°¸ñ»óÀ§¸í, Sum(IIf([ÀüÇ¥±¸ºÐ]=1,[¼ö·®],0))-Sum(IIf([ÀüÇ¥±¸ºÐ]=2,[¼ö·®],0)) AS [ÀÔ°í-°øÁ¤Àç°í¼ö·®]" _
& " FROM Ç°¸ñÄÚµå»óÀ§ INNER JOIN (ÀÚÀç»óÀ§ INNER JOIN ÀÚÀçÇÏÀ§ ON ÀÚÀç»óÀ§.ÀüÇ¥¹øÈ£ = ÀÚÀçÇÏÀ§.ÀüÇ¥¹øÈ£) ON Ç°¸ñÄÚµå»óÀ§.Ç°¸ñÄÚµå = ÀÚÀçÇÏÀ§.Ç°¸ñÄÚµå" _
& " WHERE (((ÀÚÀç»óÀ§.¹ßÇàÀÏ) <= [Forms]![ÀÚÀç»óÀ§]![¹ßÇàÀÏ])) " _
& " GROUP BY ÀÚÀçÇÏÀ§.Ç°¸ñÄÚµå, Ç°¸ñÄÚµå»óÀ§.Ç°¸ñ»óÀ§¸í " _
& " HAVING (((Sum(IIf([ÀüÇ¥±¸ºÐ]=1,[¼ö·®],0))-Sum(IIf([ÀüÇ¥±¸ºÐ]=2,[¼ö·®],0)))>0)); "

% Çʵå´Â Ç°¸ñÄÚµå, Ç°¸ñ¸í, Àç°í¼ö·®, Á¶°ÇÀº ÆûÀÇ ¹ßÇàÀÏ ÀÌÀü ÀüÇ¥¸¸ Ç¥½ÃÇÏ°í, ÀÔ°í-°øÁ¤Àç°í¼ö·®Àº ÀÔ°íµÈ ¼ö·®ÇÕ°è¿¡¼­ °øÁ¤ÅõÀÔÇհ踦 Â÷°¨ÇÑ ¼ö·®À» Ç¥½Ã
Áï Àç°í ¼ö·®ÀÌ ¤· ÀÌ»óÀÎ °Í¸¸ Ç¥±âÇϵµ·Ï ÇÏ¿´À¸³ª Ç¥±âµÇ±â Àü¿¡ ÀüüÀÔ°í¼ö·®º¸´Ù Àüü °øÁ¤ÅõÀÔ¼ö·®ÀÌ ´õ Å©Áö ¾Ê´Â ¼ö·®°è»ê vba¸¦ ¸¸µé¸é ´õ È¿À²ÀûÀÔ´Ï´Ù.
Á߿伺 : ±×·ì, Á¶°Ç, ¼ö½Ä

´ÙÀ½Àº ¿ÏÁ¦Ç°

ElseIf Forms!ÀÚÀç»óÀ§!ÀüÇ¥±¸ºÐ = 3 Then
Forms!FIND!N = 34
Forms!FIND!LIST.RowSource = "SELECT ÀÚÀçÇÏÀ§.Ç°¸ñÄÚµå, Ç°¸ñÄÚµå»óÀ§.Ç°¸ñ»óÀ§¸í, Sum(IIf([ÀüÇ¥±¸ºÐ]=2,[¼ö·®],0))-Sum(IIf([ÀüÇ¥±¸ºÐ]=3,[¼ö·®],0)) AS [°øÁ¤-¿ÏÀçÀç°í¼ö·®]" _
& " FROM Ç°¸ñÄÚµå»óÀ§ INNER JOIN (ÀÚÀç»óÀ§ INNER JOIN ÀÚÀçÇÏÀ§ ON ÀÚÀç»óÀ§.ÀüÇ¥¹øÈ£ = ÀÚÀçÇÏÀ§.ÀüÇ¥¹øÈ£) ON Ç°¸ñÄÚµå»óÀ§.Ç°¸ñÄÚµå = ÀÚÀçÇÏÀ§.Ç°¸ñÄÚµå" _
& " WHERE (((ÀÚÀç»óÀ§.¹ßÇàÀÏ) <= [Forms]![ÀÚÀç»óÀ§]![¹ßÇàÀÏ]))" _
& " GROUP BY ÀÚÀçÇÏÀ§.Ç°¸ñÄÚµå, Ç°¸ñÄÚµå»óÀ§.Ç°¸ñ»óÀ§¸í" _
& " HAVING (((Sum(IIf([ÀüÇ¥±¸ºÐ]=2,[¼ö·®],0))-Sum(IIf([ÀüÇ¥±¸ºÐ]=3,[¼ö·®],0)))>0));"
% ±×¸®°í ´ÙÀ½ÁÙ·Î º¯°æ½Ãų ¶§ ½Ç¼ö ÇÏ´Â °ÍÀÌ " »ç¿ë°ú _ ±¸ºÐÀÚ »ç¿ë ±×¸®°í & »ç¿ë¿¡ ÁÖÀÇÀ» ±â¿ïÀÏ ÇÊ¿ä°¡ ÀÖ½À´Ï´Ù.

´ÙÀ½Àº ÆǸÅ
ElseIf Forms!ÀÚÀç»óÀ§!ÀüÇ¥±¸ºÐ = 4 Then
Forms!FIND!N = 44
Forms!FIND!LIST.RowSource = "SELECT ÀÚÀçÇÏÀ§.Ç°¸ñÄÚµå, Ç°¸ñÄÚµå»óÀ§.Ç°¸ñ»óÀ§¸í, Sum(IIf([ÀüÇ¥±¸ºÐ]=3,[¼ö·®],0))-Sum(IIf([ÀüÇ¥±¸ºÐ]=4,[¼ö·®],0)) AS [¿ÏÀç-ÆǸÅÀç°í¼ö·®]" _
& " FROM Ç°¸ñÄÚµå»óÀ§ INNER JOIN (ÀÚÀç»óÀ§ INNER JOIN ÀÚÀçÇÏÀ§ ON ÀÚÀç»óÀ§.ÀüÇ¥¹øÈ£ = ÀÚÀçÇÏÀ§.ÀüÇ¥¹øÈ£) ON Ç°¸ñÄÚµå»óÀ§.Ç°¸ñÄÚµå = ÀÚÀçÇÏÀ§.Ç°¸ñÄÚµå" _
& " WHERE (((ÀÚÀç»óÀ§.¹ßÇàÀÏ) <= [Forms]![ÀÚÀç»óÀ§]![¹ßÇàÀÏ]))" _
& " GROUP BY ÀÚÀçÇÏÀ§.Ç°¸ñÄÚµå, Ç°¸ñÄÚµå»óÀ§.Ç°¸ñ»óÀ§¸í" _
& " HAVING (((Sum(IIf([ÀüÇ¥±¸ºÐ]=3,[¼ö·®],0))-Sum(IIf([ÀüÇ¥±¸ºÐ]=4,[¼ö·®],0)))>0));"
End If
Forms!FIND!¼º¸í1.SetFocus
End If

End Sub

¡¡

Private Sub ¼ö·®_AfterUpdate()
Me.±Ý¾× = Me.´Ü°¡ * Me.¼ö·®
'ss
End Sub 

Private Sub ¼ö·®_DblClick(Cancel As Integer)
Dim aa As Integer
Dim bb As Integer
Dim cc As Integer
Dim dd As Integer
aa = Nz(DSum("¼ö·®", "ÀÚÀçÃÑ°ý", "[ÀüÇ¥±¸ºÐ]=1 and [Ç°¸ñÄÚµå]=Forms!ÀÚÀç»óÀ§!ÀÚÀçÇÏÀ§.Form!Ç°¸ñÄÚµå and [¹ßÇàÀÏ]<=Forms!ÀÚÀç»óÀ§!¹ßÇàÀÏ"), 0)
nzÇÔ¼ö´Â µµ¿ò¸»¿¡¼­ ÂüÁ¶ÇϽñ⠹ٶø´Ï´Ù.
Äõ¸® ÀÚÀçÃÑ°ý¿¡¼­ ÀüÇ¥±¸ºÐÀÌ ÀÔ°í¸ç ÆûÀÇ ¹ßÇàÀϺ¸´Ù ÀÌÀü ¼ö·®ÀÇ Á¶°Ç ÇÕ°è
bb = Nz(DSum("¼ö·®", "ÀÚÀçÃÑ°ý", "[ÀüÇ¥±¸ºÐ]=2 and [Ç°¸ñÄÚµå]=Forms!ÀÚÀç»óÀ§!ÀÚÀçÇÏÀ§.Form!Ç°¸ñÄÚµå and [¹ßÇàÀÏ]<=Forms!ÀÚÀç»óÀ§!¹ßÇàÀÏ"), 0)
cc = Nz(DSum("¼ö·®", "ÀÚÀçÃÑ°ý", "[ÀüÇ¥±¸ºÐ]=3 and [Ç°¸ñÄÚµå]=Forms!ÀÚÀç»óÀ§!ÀÚÀçÇÏÀ§.Form!Ç°¸ñÄÚµå and [¹ßÇàÀÏ]<=Forms!ÀÚÀç»óÀ§!¹ßÇàÀÏ"), 0)
dd = Nz(DSum("¼ö·®", "ÀÚÀçÃÑ°ý", "[ÀüÇ¥±¸ºÐ]=4 and [Ç°¸ñÄÚµå]=Forms!ÀÚÀç»óÀ§!ÀÚÀçÇÏÀ§.Form!Ç°¸ñÄÚµå and [¹ßÇàÀÏ]<=Forms!ÀÚÀç»óÀ§!¹ßÇàÀÏ"), 0)
MsgBox "ÇöÀç ÀÔ°í-°øÁ¤;" & aa - bb & "°³ Àç°í, °øÁ¤-¿ÏÁ¦Ç°;" & bb - cc & "°³ Àç°í, " _
& " ¿ÏÀç-ÆǸÅ;" & cc - dd & "°³ Àç°í", vbMsgBoxSetForeground, "º¯Á¤ÇÑ"
% ½ÇÀº À§ÀÇ ÀÚ·á°¡ ¾øÀ» ½Ã else ¸¦ »ç¿ëÇÏ¿© ´Ù¸¥ ³»¿ëÀ» Ãß°¡ Çغ¸½Ê½Ã¿À
End Sub

Private Sub â°íÄÚµå_GotFocus()
Me.â°íÄÚµå.Dropdown
End Sub

Private Sub Ç°¸ñÄÚµå_DblClick(Cancel As Integer)
On Error GoTo Err_Ç°¸ñÄÚµå_DblClick
Me.´ÜÀ§.SetFocus
% ´ÜÀ§ Çʵå·Î Æ÷Ä¿½º À̵¿
Dim FIND As String
FIND = "*" & [Forms]![ÀÚÀç»óÀ§]![ÀÚÀçÇÏÀ§].Form![Ç°¸ñÄÚµå] & "*"
ÀÚÀç»óÀ§ÀÇ ÀÚÀçÇÏÀ§Æû Áß Ç°¸ñÄÚµåÀÇ ÀϺγ»¿ë
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

2°¡ÁöÀÇ Ç°¸ñÄÚµå ÁúÀÇ ÆûÀ¸·Î Ç¥½ÃÇϵµ·Ï ÇÏ¿´½À´Ï´Ù. 
1. Ç°¸ñÄڵ忡 nullÀÎ °æ¿ì Àüüǰ¸ñÄڵ尡 Ç¥±â
2. Ç°¸ñÄڵ忡 ÀϺÎÄڵ带 ¾Ë°í ÀÖ´Â °æ¿ì ÀϺÎÇ׸ñ°Ë»ö


If Forms!ÀÚÀç»óÀ§!ÀüÇ¥±¸ºÐ = 1 Then
Forms!FIND!N = 13
ElseIf Forms!ÀÚÀç»óÀ§!ÀüÇ¥±¸ºÐ = 2 Then
Forms!FIND!N = 23
ElseIf Forms!ÀÚÀç»óÀ§!ÀüÇ¥±¸ºÐ = 3 Then
Forms!FIND!N = 33
ElseIf Forms!ÀÚÀç»óÀ§!ÀüÇ¥±¸ºÐ = 4 Then
Forms!FIND!N = 43
End If
Forms!FIND.LIST.Requery
Forms!FIND!¼º¸í1.SetFocus
Exit_Ç°¸ñÄÚµå_DblClick:
Exit Sub
Err_Ç°¸ñÄÚµå_DblClick:

' MsgBox "ÀÚ·áÀÌ»óÀ¸·Î Ãß°¡ À̵¿ÇÒ ¼ö ¾ø½À´Ï´Ù.È®ÀÎÇϽʽÿä.´Ù½Ã È®ÀÎÇϼ¼¿ä", vbYes, "B&H DATABASE º¯Á¤ÇÑ", vbOKOnly
MsgBox Err.Description
Resume Exit_Ç°¸ñÄÚµå_DblClick
[ÂüÁ¶] À§ ¿¹Á¦´Â ¿¡·¯¿¡ ´ëÇÑ »ý°¢À» ÇÏ¿© ÇÁ·Î±×·¥À» ÀÛ¼ºÇÑ °ÍÀÌ´Ù.
End Sub

¸ñÂ÷ | ÀÌÀü | ´ÙÀ½

¡¡

¿ÀÇǽºÆ©ÅÍ ±â¾÷ASP¼­ºñ½º 135-880 ¼­¿ï½Ã °­³²±¸ »ï¼ºµ¿ 157-3 ¿¤ÁöÆ®À©ÅÚ 2Â÷ 1603È£ ¢Ï070-7098-2554
Copyright ¨Ï 1999-2008 Officetutor.com All rights reserved
¡¡