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

¦bEXCEL VBA¤¤ªºMS SQL¬d¸ß»yªk¡A¦p¦ó¥Î¿é¤Jªº¤è¦¡²£¥Í¡H

¦^´_ 1# badboy01
¦]¬°¨Sµ¹«e«áªºµ{¦¡½X , °²³]§A³o¬q¬°¦r¦ê..........
"......where ApplyDateTime Between '20120101' and '20121231' and Excuse='¯S¥ð°²'......"

'«Å§i¦r¦êÅܼÆ
Dim sStartDate as string , sEndDate as string
sStartDate = "20120101"
sEndDate = "20121231"
'¤W­±ªº¨º¬q¦r¦ê§ï¬°
"......where ApplyDateTime Between '" & sStartDate & "' and '" & sEndDate & "' and Excuse='¯S¥ð°²'......"

TOP

¦^´_ 3# badboy01
sStartDate =TextBox1.Text
sEndDate =TextBox2.Text

TOP

¥»©«³Ì«á¥Ñ stillfish00 ©ó 2012-12-7 17:28 ½s¿è

¦^´_ 6# badboy01
OK , ©Ò¥H§A¬Oµ{¦¡¼g¦b¼Ò²Õ¤º ,
°²³]§A¬Oª½±µ¦b¤u§@ªí1 (¤u§@ªí¦WºÙ) ,  ´¡¤JActiveXªº¤å¦r¤è¶ô
³o¼Ëªº¸Ü§AªºTextbox1­n«ü©w¬O­þ­Ó¤u§@ªí ,
¤]´N¬O§â­ì¥»ªº Textbox1.Text §ï¼g¦¨  sheets("¤u§@ªí1").Textbox1.Text
Textbox2¦P²z

TOP

¦^´_ 10# badboy01
³o¤è­±§Ú¤]¤£¤Ó¼ô , ºëµØ°Ï¤º¦³¤@¨Ç«OÅ@¤u§@ªí©Îµ{¦¡½Xªº°Q½×¤]³\§A¯à°Ñ¦Ò¬Ý¬Ý

TOP

        ÀR«ä¦Û¦b : ¦³¤ß´N¦³ºÖ¡A¦³Ä@´N¦³¤O¡A¦Û³yºÖ¥Ð¡A¦Û±oºÖ½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD