- ©«¤l
- 5
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 10
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- windows7
- ¾\ŪÅv
- 10
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2014-4-27
- ³Ì«áµn¿ý
- 2014-5-6
|
[µ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 |
|