ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] [½Ð±Ð!!!]access¬d¸ßªí³æ¡A®Ö¨ú¤è¶ô¬d¸ß

[µo°Ý] [½Ð±Ð!!!]access¬d¸ßªí³æ¡A®Ö¨ú¤è¶ô¬d¸ß



·Q°µ¤@­Ó¬d¸ß¡A¬d¸ß¤¶­±¦p¤W¹Ï¡A¥ª¤èªº±ø¥óvbaµ{¦¡¤w§¹¦¨¡A
³Ñ¤U¥k¤èªº®Ö¨ú¤è¶ô¬d¸ß¡A§Úªº®Ö¨ú¤è¶ô¬O¨Ì¤U¤è¤l³øªíªº±M®×Ãþ§O¥h°µ¬d¸ß
±M®×Ãþ§O¬°¦h­«­È©Î¬O³æ¤@­È¡A½Ð°Ý³o¼Ë­n«ç»ò¼g¬d¸ß»yªk

§Ú¥Ø«eªº¬d¸ß»yªk¬°(¼g¦b¬d¸ß«ö¶sªºclick¨Æ¥ó)
Private Sub ProjectSearch_Click()
Dim stCri As String

If Me![SearchName] <> "" Then
        stCri = "±M®×¦WºÙ like '*" & Me![SearchName] & "*'"
End If

If Me!S1 <> "" Or Me!S2 <> "" Then
    If stCri <> "" Then stCri = stCri & " and "
        stCri = stCri & "[¶}©l®É¶¡] Between IIf(IsNull([FORMS]![±M®×¬d¸ß¤¶­±]![S1]),#1911/1/1#,[FORMS]![±M®×¬d¸ß¤¶­±]![S1]) And IIf(IsNull([FORMS]![±M®×¬d¸ß¤¶­±]![S2]),#2030/1/1#,[FORMS]![±M®×¬d¸ß¤¶­±]![S2])"
End If

If Me!E1 <> "" Or Me!E2 <> "" Then
    If stCri <> "" Then stCri = stCri & " and "
        stCri = stCri & "[µ²§ô®É¶¡] Between IIf(IsNull([FORMS]![±M®×¬d¸ß¤¶­±]![E1]),#1911/1/1#,[FORMS]![±M®×¬d¸ß¤¶­±]![E1]) And IIf(IsNull([FORMS]![±M®×¬d¸ß¤¶­±]![E2]),#2030/1/1#,[FORMS]![±M®×¬d¸ß¤¶­±]![E2])"
End If

If Me![SearchClient] <> "" Then
    If stCri <> "" Then stCri = stCri & " and "
       stCri = stCri & "¤½¥q¦WºÙ like '*" & Me![SearchClient] & "*'"
End If

If Me![SearchPM] <> "" Then
    If stCri <> "" Then stCri = stCri & " and "
        stCri = stCri & "[PM] = '" & Me![SearchPM] & "'"
End If

If Me![SearchInCharge] <> "" Then
    If stCri <> "" Then stCri = stCri & " and "
        stCri = stCri & "[In Charge] = '" & Me![SearchInCharge] & "'"
End If


If stCri <> "" Then
Me.±M®×¬d¸ß¤lªí³æ.Form.RecordSource = "SELECT * from ±M®×¬d¸ß " & _
                                    "where " & stCri & _
                                    " order by ±M®×¦WºÙ"
Else
Me.±M®×¬d¸ß¤lªí³æ.Form.RecordSource = "SELECT * from ±M®×¬d¸ß " & _
                                    "order by ±M®×¦WºÙ"
End If

End Sub

¿z¿ï±ø¥ó¤£¤Ö, ¥i¥H§Q¥ÎInstr ©Î Like ¶i¦æ¹LÂo¿z¿ï±ø³v¤@«Ø¥ß.  ¦n¹³没¦³§ó²³æ¤è¦¡¤F.

TOP

        ÀR«ä¦Û¦b : §g¤l¥ß«í§Ó¡A¤p¤H«í¥ß§Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD