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

ACCESS¬d¸ßªí³æ»s§@

ACCESS¬d¸ßªí³æ»s§@

«ô°U~½Ö¥i¥HÀ°À°§Ú!!!!
·Q°µ¹³¥H¤Uªº¬d¸ß¡A
1.¤@¶}©l¶i¤J­¶­±¡A¬°Åã¥Ü¥þ³¡¸ê®Æ
2.¿ï¾Ü±ø¥óµM«áÂI¿ï¬d¸ß¡A¬d¸ßµ²ªGÅã¥Ü¦b¤U¤è¤l³øªí
3.¬d¸ß¥i¥H¬O³æ¤@±ø¥ó¡A©Î¦h­Ó±ø¥ó¤@°_¬d¸ß
4.ÂI¿ï²M°£¬d¸ß¡A¦^´_¬°¤@¶}©l¶i¤Jªºµe­±

¤W¶Ç³¡¥÷¸ê®Æ,¥H§Q¦^µª

TOP

¦^´_ 2# aa7551

µ{¦¡½X·|·Q³o¼Ë·Q¡A¥D­n¬O¬°¤F¡A
¤@¶}©l¶i¤J­¶­±¡AÅã¥Ü©Ò¦³¸ê®Æ¡A¦]¬°¦pªG¥Î¬d¸ß³]·Ç«hªº¤è¦¡¡A¤lªí³æ¤¤¡A³]·Ç«hªºÄæ¦ì¦pªÅ­È´N¤£·|Åã¥Ü
©Ò¥H§ï¥Î¼gµ{¦¡½X¡A³o¼Ë¤@¶}©l¶i¤J­¶­±´N·|Åã¥Ü¥þ³¡¸ê®Æ¡A
¥u¬O²{¦b¤£ª¾¹D§Úªºµ{¦¡¡A¥X¤F¬Æ»ò°ÝÃD¡A³Ì¤U­±¬õ¦r¼Ð°Oªº¡A­þ¸Ì¦³¿ù¡A
¿ï¨úIn Charge ¸ò¿é¤J«È¤á¦WºÙ¡AµLªk¬d¸ß¡A½ÐÀ°§Ú¸Ñµª¡AÁÂÁÂ!!!



If IsNull(Me![SearchName]) = True Then '­YÄæ¦ìµL°O¿ý
    Me![±M®×¬d¸ß¤lªí³æ].Form.RecordSource = "select * from ±M®×¬d¸ß" '§ó§ï¤lªí³æ°O¿ý¨Ó·½
ElseIf IsNull(Me![SearchName]) = False Then '­YÄæ¦ì¦³°O¿ý
    Me![±M®×¬d¸ß¤lªí³æ].Form.RecordSource = "select * from ±M®×¬d¸ß where [±M®×¦WºÙ] Like '" & IIf(IsNull(Me![SearchName]), " * ", ("*" & Me![SearchName] & "*")) & "'" '§ó§ï¤lªí³æ°O¿ý¨Ó·½


ElseIf IsNull(Me![SearchPM]) = True Then
    Me![±M®×¬d¸ß¤lªí³æ].Form.RecordSource = "select * from ±M®×¬d¸ß"
ElseIf IsNull(Me![SearchPM]) = False Then
    Me![±M®×¬d¸ß¤lªí³æ].Form.RecordSource = "select * from ±M®×¬d¸ß where [PM] Like '" & IIf(IsNull(Me![SearchPM]), " * ", Me![SearchPM]) & "'"


ElseIf IsNull(Me![SearchClient]) = True Then
    Me![±M®×¬d¸ß¤lªí³æ].Form.RecordSource = "select * from ±M®×¬d¸ß"
ElseIf IsNull(Me![SearchClient]) = False Then
    Me![±M®×¬d¸ß¤lªí³æ].Form.RecordSource = "select * from ±M®×¬d¸ß where [«È¤á] Like '" & IIf(IsNull(Me![SearchClient]), " * ", Me![SearchClient]) & "'"


ElseIf IsNull(Me![SearchInCharge]) = True Then
    Me![±M®×¬d¸ß¤lªí³æ].Form.RecordSource = "select * from ±M®×¬d¸ß"
ElseIf IsNull(Me![SearchInCharge]) = False Then
    Me![±M®×¬d¸ß¤lªí³æ].Form.RecordSource = "select * from ±M®×¬d¸ß where [In Charge] Like '" & IIf(IsNull(Me![SearchInCharge]), " * ", Me![SearchInCharge]) & "'"

TOP

¦^´_ 2# aa7551
ÁÙ¬O¥i§_±NÀÉ®×±Hµ¹±z¡AÅý§AÀ°§Ú¬Ý¤@¤U¡AÁÂÁÂ!!
§Ú¹J¨ìÆZ¦h°ÝÃDªº

TOP

[email protected],­Ó¤H»{¬°¬[ºc¥X°ÝÃD,¦P¤@µe­±¦³»Ý­n³o»ò¦h±ø¥ó¶Ü,ÁÙ¬O§A¤@¦¸»Ý­n¬Ý³o»ò¤~¯àº¡¨¬

TOP

¥ÎACCESS»s§@¬d¸ß¤¶­±®É¹J¨ì¤@¨Ç°ÝÃD¡A¥i§_½Ð§AÀ°§Ú«üÂI°g¬z¡A«D±`·PÁÂ!!!!

¥´¶}¸ê®Æ®w·|¥X²{±M®×¬d¸ß¤¶­±¡A·Q°µ¨ì¥H¤U¥\¯à¡G
1.¤@¶}©l¶i¤J­¶­±¤À¬°¤W¥b³¡¤Î¤U¥b³¡
2.¤W¥b³¡
  (1)¤å¦r¤è¶ô¡G±M®×¦WºÙ «È¤á ¶}©l¤é´Á µ²§ô¤é´Á
      ¤U©Ô¦¡¿ï³æ¡G¿ï¨úPM ¿ï¨úIn Charge
   6­Ó±ø¥ó¬d¸ß¡A¥i¥H¬O³æ¤@±ø¥ó,¤]¥i¥H¬O¦h­Ó±ø¥ó
     
  (2)«ö¶s¡G¬d¸ß ²M°£¬d¸ß
   ¿ï¾Ü±ø¥ó«á¡AÂI¿ï¬d¸ß¡A¬d¸ßµ²ªGÅã¥Ü¤U¤è¤l³øªí
   ÂI¿ï²M°£¬d¸ß¡A·|²MªÅ­è¿ï¾Üªº±ø¥ó¡AµM«á¥i¥H¦A­«·s¬d¸ß§Oªº±ø¥ó
3.¤U¥b³¡
    ¤l³øªí¡G¤@¶}©l¶i¤J¬d¸ß­¶­±Åã¥Ü¥þ³¡¸ê®Æ¤ÎÅã¥Ü¬d¸ßµ²ªG

²{¦b¹J¨ìªº°ÝÃD¦³¡G
¥´¶}±M®×¬d¸ß¡A¸Ì­±¦³¥H¤U·Ç«h
In Charge¡G
Is Null Or Like IIf(IsNull([forms]![±M®×¬d¸ß¤¶­±]![SearchInCharge]),"*",[forms]![±M®×¬d¸ß¤¶­±]![SearchInCharge])

PM¡G
Is Null Or Like IIf(IsNull([forms]![±M®×¬d¸ß¤¶­±]![SearchPM]),"*",[forms]![±M®×¬d¸ß¤¶­±]![SearchPM])

¶}©l®É¶¡¡G
Is Null Or Between IIf(IsNull([FORMS]![±M®×¬d¸ß¤¶­±]![StartDate1]),#1911/1/1#,[FORMS]![±M®×¬d¸ß¤¶­±]![StartDate1]) And IIf(IsNull([FORMS]![±M®×¬d¸ß¤¶­±]![StartDate2]),#2030/1/1#,[FORMS]![±M®×¬d¸ß¤¶­±]![StartDate2])

µ²§ô®É¶¡¡G
Is Null Or Between IIf(IsNull([FORMS]![±M®×¬d¸ß¤¶­±]![EndDate1]),#1911/1/1#,[FORMS]![±M®×¬d¸ß¤¶­±]![EndDate1]) And IIf(IsNull([FORMS]![±M®×¬d¸ß¤¶­±]![EndDate2]),#2030/1/1#,[FORMS]![±M®×¬d¸ß¤¶­±]![EndDate2])

¬d¸ß«ö¶s¼g¤@­ÓVBA¬°
Private Sub ProjectSearch_Click()
   Me![±M®×¬d¸ß¤lªí³æ].Requery
End Sub


°ÝÃD1.³Ì¶}ÀYªºIS NULL¬O¦]¬°³o¨Ç·Ç«hÄæ¦ì·|¦³¨S¸ê®Æªº±¡ªpµo¥Í¡A¬°¤FÅý¤@¶}©l¶i¤J¬d¸ß­¶­±¡A¤U¤è¤l³øªíÅã¥Ü©Ò¦³¸ê®Æ
¤£¹L²{¦b¥X²{¤@­Ó°ÝÃD¬O¡A
·í§Ú¿ï±ø¥ó¡A«ö¤U¬d¸ß«ö¶s®É¡A¤U¤è¤l³øªí·|Åã¥Ü§Ú¿ï¨úªº±ø¥óµ²ªG¤§¥~³sÄæ¦ì¬°ªÅ­Èªº¸ê®Æ¤]Åã¥Ü
¨Ò¦p¡G¿ï¨úIn Charge¿ï¾Ü´¿°êºû®É¡A¸ê®Æ·|Åã¥ÜIn Charge¬°´¿°êºûªº¸ê®Æ¡A¤ÎIn Charge¬°ªÅ­Èªº¸ê®Æ
§Ú§Æ±æ¯à¥uÅã¥Ü§Ú¿é¤J±ø¥óªº¸ê®Æ¡A¤£ª¾¹D·Ç«h­n«ç»ò­×§ï¤~¯à°µ¨ì¤@¶}©l¿¤¥«©Ò¦³¸ê®Æ¥]¬A¦³ªÅ­È¸ê®Æ¡A¬d¸ß¿z¿ï®É¥uÅã¥Ü§Ú¿ï¾Ü±ø¥óªº¸ê®Æ

°ÝÃD2.¤W¤èÁÙ¦³¤@¨Ç±M®×Ãþ§O¿ï¨úªº®Ö¨ú¤è¶ô¡A§Ú·Q¨Ì¤U¤è¤l³øªí±M®×Ãþ§OÄæ¦ì°µ¿ï¾Ü¡A¥t¥~±M®×Ãþ§OÄæ¦ì¬°¦h­«­È¡A
¥Î¦h­«­ÈÄæ¦ì¬O¤£¬OµLªk°µ§ì¸ê®Æ¡A¬O§_¶·§ï¨ä¥L¤è¦¡??

TOP

Is Null Or Like IIf(IsNull([forms]![±M®×¬d¸ß¤¶­±]![SearchInCharge]),"*",[forms]![±M®×¬d¸ß¤¶­±]![SearchInCharge]),·í¸ê®Æ¬OªÅªº,¶i¤Jiif§PÂ_®É·|¦¨¬°¤°»ò?iif(isnull(....),"*",............),¦bsql»y¥y®Éselect ..........from ........... where .........,¦bwhere  ±ø¥ó = ...........,¦p¬OªÅ­È,«h¤£À³¬°­×¥ó

TOP

        ÀR«ä¦Û¦b : µêªÅ¦³ºÉ¡D§ÚÄ@µL½a¡AµoÄ@®e©ö¦æÄ@Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD